icode@test:~/lab/dir/sadf$ ssh remote_name@ip.ip.ip.ip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa.
Please contact your system administrator.
Add correct host key in /home/hicode/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/hicode/.ssh/known_hosts:28
remove with: ssh-keygen -f "/home/hicode/.ssh/known_hosts" -R ip.ip.ip.ip
ECDSA host key for ip.ip.ip.ip has changed and you have requested strict checking.
Host key verification failed.
解决方法:
按给出的指令删除要连接的主机存过的密匙即可,重启后再次连接会生成新的密匙。
# hostname为你主机的用户名,-R后面接你要远程的ip地址
1 | ssh-keygen -f "/home/hostname/.ssh/known_hosts" -R ip.ip.ip.ip