【发布时间】:2014-05-23 06:45:44
【问题描述】:
我刚刚在 AWS EC2 上创建了一个实例。我获得了 ec2 用户的 pub/private 密钥,并且能够使用我的 puTTY 客户端从我的 Windows 机器登录。
现在,我想用一个新用户 (xxxx) 连接到同一个实例。为此:
- 首先我在 AWS 实例上使用“useradd”创建了一个用户
- 在我的 Windows 机器上使用 puTTYgen 生成了 pub/private 密钥
- 已将发布密钥内容复制到 >> /root/.ssh/authorized_keys 文件。
- 现在,我正在尝试使用 puTTY 通过使用私钥进行连接
但我无法登录,并且出现以下错误:
Authentication log (see session log for details):
Using username "xxxx".
Server refused our key
No supported authentication methods left to try!
Connection has been unexpectedly closed. Server sent command exit status 0.
【问题讨论】:
标签: linux amazon-ec2 ssh-keys