我使用bitami AMI创建了一个EC2实例。我使用ec2-add-keypair实用程序
创建了一个ec2密钥对当我尝试ssh -i id_rsa-my-keypair bitami@<myinstance> -v
我收到以下错误
debug1: ssh_ecdsa_verify: signature correct
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: settwo_05012012.pem
debug1: Authentications that can continue: publickey
debug1: Trying private key: id_rsa-my-keypair
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
有趣的是,我尝试使用与ubuntu ami相同的密钥对创建另一个实例,我没有问题进入。我已经排除了端口22问题。我真的想用这个比喻。非常感谢帮助。
以下是ssh config中的几行
cat ssh_config|grep -v "#"
Host *
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
答案 0 :(得分:0)
试试这个:ssh -i id_rsa-my-keypair bitnami @ myinstance -v
用户应该 bitnami 而不是bitami。