当我想要ssh到我的ec2主机时,我得到了这个权限被拒绝的问题。 我尝试了现有的解决schemechmod 600 "My.pem"但仍然没有工作。 这是我的debugging信息:
debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: Connecting to 54.223.47.74 [54.223.47.74] port 22. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file My.pem type -1 debug1: key_load_public: No such file or directory debug1: identity file My.pem-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.9 debug1: Remote protocol version 2.0,remote software version OpenSSH_6.6.1 debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000 debug1: Authenticating to 54.223.47.74:22 as 'root' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client chacha20-poly[email protected] <implicit> none debug1: kex: client->server chacha20-poly[email protected] <implicit> none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:tfjxcE5kePSv1cJK7SWBp/56kgm2DQkyPLSLZ4d73Io debug1: Host '54.223.47.74' is kNown and matches the ECDSA host key. debug1: Found key in /Users/tan/.ssh/kNown_hosts:24 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic debug1: Next authentication method: publickey debug1: Trying private key: My.pem debug1: Authentications that can continue: publickey,gssapi-with-mic debug1: No more authentication methods to try. Permission denied (publickey,gssapi-with-mic).
Cygwin rSnapshot on windows权限被拒绝,而权限被保留
权限被拒绝在Linux上的Netbeans上创build一个Maven企业应用程序
使用Nginx的Vagrant文件夹权限
SSH在远程PC在同一networking – 权限被拒绝(公钥)
什么权限jenkins必须执行shell命令而不是不安全?
通过连接用户centos而不是ec2-user 。
我使用命令在我的centos机器上解决了这个问题:
ssh -i <Your.pem> ec2-user@<YourserverIP>
这是关于我的情况下ec2-user userName 。
参考来源: AMAZON故障排除
权限被拒绝(publickey,gssapi-keyex,gssapi-with-mic,密码)。
ssh-keygen -f " ~/.ssh/kNown_hosts" -R xx.xx.xxx.xxx
xx – ip主机
http://pastebin.com/YpqGSJ2E
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。