Recently, when I ssh to my hpc account from local, I had this warning that remote host identification has changed.
ssh [[email protected]](<mailto:[email protected]>)
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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.
This is because Greene has multiple login nodes (log-1, log-2, and log-3) that greene.hpc.nyu.edu resolves to. check tips in NYU High Performance Computing - Tunneling and X11 Forwarding (google.com)
Since I'm sure that the remote computer isn't compromised, hacked etc then all we need to do is delete the entry in the known_hosts file for the remote computer. That will solve the issue as there will no longer be a mismatch with fingerprint IDs when connecting.
solution 1:
To avoid this warning, you can add these lines to your SSH configuration file. Open the file "~/.ssh/config" and place the following lines in it:
Host *.hpc.nyu.edu
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LogLevel ERROR
solution 2:
ssh-keygen -R greene.hpc.nyu.edu
$ ssh-keygen -R {server.name.com}
| $ ssh-keygen -R {ssh.server.ip.address}
| $ ssh-keygen -R server.example.com
will remove the corresponding server key
solution 3:
Since I'm sure that the remote computer isn't compromised, hacked etc then all we need to do is delete the entry in the known_hosts file for the remote computer. That will solve the issue as there will no longer be a mismatch with fingerprint IDs when connecting.
open ~/.ssh/known_hosts
Then I would delete the lines starting with greene.hpc.nyu.edu.