【发布时间】:2016-05-13 15:05:53
【问题描述】:
我在亚马逊 ec2 上的 rhel 实例上永久删除了我的 ec2-user 主目录
谢天谢地,我仍然登录到我的服务器
我没有目录或快照的任何备份副本
我知道我可以从我的私钥重新创建我的公钥,我还将我的公钥复制到 /home/ec2-user/.ssh/authorized_keys 这就是我重新创建公钥的方式
ssh-keygen -y -f test.pem > test.pub
由于某种原因,这些步骤还不够,我仍然无法 ssh 进入我的服务器
我是否缺少任何步骤?有人可以指导我吗?
这是我尝试登录时遇到的错误
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
xx.
Please contact your system administrator.
Add correct host key in /Users/xx/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/xx/.ssh/known_hosts:5
ECDSA host key for ec2-xx-xx-xx-xx.compute-1.amazonaws.com has changed and you have requested strict checking.
Host key verification failed.
【问题讨论】:
标签: amazon-web-services ssh amazon-ec2 rhel