[英]AWS: Adding SSH keys for my user
I just created an instance on AWS EC2.我刚刚在 AWS EC2 上创建了一个实例。 I got the ec2-user's pub/private keys and I'm able to login using my puTTY client from my Windows machine.
我获得了 ec2-user 的 pub/private 密钥,并且可以使用我的 puTTY 客户端从我的 Windows 机器登录。
Now, I want to connect to the same instance with a new user(xxxx).现在,我想使用新用户(xxxx)连接到同一个实例。 For that:
为了那个原因:
But I'm unable to login, and I'm getting the following error:但是我无法登录,并且出现以下错误:
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.
我可以通过在 xxxx 用户主目录( /home/xxxx/.ssh/authorized_keys
)而不是/root/.ssh/authorized_keys
下创建一个 authorized_keys 文件来解决这个问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.