【发布时间】:2013-03-10 16:44:31
【问题描述】:
我刚刚在 AWS 上创建了一个 EC2 实例。在此之前,我创建了我的密钥对,下载了私钥。
我现在正尝试登录到新创建的实例(使用正确的主机名,当然,我在此处替换的内容是为了安全起见)。我添加了 -v 开关来获取调试输出:
ssh ec2-user@myVirtualHost.compute-1.amazonaws.com -i ~/EC2key.pem -v
虽然我提供了密钥文件,但我被要求输入密码。以下是调试输出的摘录,可能显示出了什么问题:
debug1: Host 'myVirtualHost.compute-1.amazonaws.com' is known and matches the ECDSA host key.
debug1: Found key in /home/myuser/.ssh/known_hosts:15
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,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/myuser/EC2key.pem
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
ec2-user@myVirtualHost.compute-1.amazonaws.com's password:[asks for password here]
为什么在“read PEM private key done: type RSA”之后的结论是“Authentications that can continue: publickey,password”?
【问题讨论】:
-
是的,但没有得到答复。我的 ssh_config 没有将 PasswordAuthentication 设置为 yes。唯一启用的设置是:SendEnv LANG LC_*; HashKnownHosts 是; GSSAPIAuthentication 是; GSSAPIDelegateCredentials 否
标签: security amazon-web-services amazon-ec2