ssh and ip change - Warning: Remote Host Identification Has Changed error and solution | |
---|---|
Subject: | |
I have had a problem before where trying to connect with a mac outside my network through SSH. If you have request strict checking host key verification will fail. | |
2015-10-09 16:54:13 | gstlouis |
references: http://www.cyberciti.biz/faq/warning-remote-host-identification-has-changed-error-and-solution/
Solution #1: Remove keys Use the -R option to removes all keys belonging to hostname from a known_hosts file. This option is useful to delete hashed hosts. If your remote hostname is server.example.com, enter:
Solution #2: Add correct host key in /home/user/.ssh/known_hosts It is not necessary to delete the entire known_hosts file, just the offending line in that file. For example if you have 3 server as follows. To delete 2nd server (myserver.com), open file: Solution 3: Just delete the known_hosts file If you have only used one ssh server $ cd | gstlouis |
2015-10-09 16:55:19 | |
ssh-keygen -R "you server hostname or ip" this works fine | gstlouis |
2016-07-02 15:07:26 | |