我试图使用命令来建立一个AWS服务器的SSH连接:AWS SSH连接问题:权限被拒绝(公钥)
的ssh -v -i ABC-密钥对,nvirginia.pem管理员@ EC2-XX -xx-xx-xxx.compute-1.amazonaws.com (试过根/ Ubuntu的/ EC2用户,而不是管理太)
日志跟踪:
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 1x:xx:aa:aa:aa:aa:a0:aa:aa:aa:aa:aa:aa:aa:xx:xx
debug1: Host 'ec2-xx-xx-xx-xxx.compute-1.amazonaws.com' is known and matches the ECDSA host key.
debug1: Found key in /home/abc/.ssh/known_hosts:12
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
debug1: Next authentication method: publickey
debug1: Offering RSA public key: [email protected]
debug1: Authentications that can continue: publickey
debug1: Trying private key: abc-key-pair-nvirginia.pem
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
我见过几个环节在互联网上,但无法弄清楚如何解决这个问题。有人可以请建议如何调试? 谢谢,
什么Linux发行版是nstance?这是您实例启动后第一次连接吗? – helloV
我使用的是Ubuntu 14.我昨天创建了这个帐户,并且自那以后尝试了多次,但是发生了相同的错误。 – Naveen
使用ubuntu @ host。你确定你正在使用正确的私钥吗? – helloV