When accessing an endpoint via.ssh from a Mac for the first time, there is an authentication that occurs which matches a key on the remote host to a directory entry on your machine.
Sed -i "46 d".ssh/known_hosts ssh secrethost.So ssh-keygen -R hostname is a nice syntax as you even do not have to provide the file name and path for known_hosts and it works with hashed names.That was easy, wasnt [email protected]:255 etc/ssh ssh-keygen -R secrethost /home/ccm/.ssh/known_hosts updated.I hope that key wasn't your only method of steaming one game at a time access to the server and you have some other way of logging in and editing the file.Original contents retained as /home/ccm/.ssh/known_hosts.You can advice ssh-keygen to delete (-R) fingerprints for a hostname which helps you when you turned hashed hostnames on in you known_hosts: ssh secrethost @ warning: remote host identification HAS changed!
This will open a text editor that displays all of your keys.
It will be formatted as first an IP address followed by the keys associated with that address.
I randomly checked man ssh which gives you a lot of hints about the usage of known_hosts but I just did not find information about how to delete an old fingerprint or even overwrite.
Yes, warning: Permanently added ' hostname ' (DSA) to the list of known hosts.
Therefore I browsed through the man pages and finally found what I was looking for in man ssh-keygen.
Open /Users/ username /.ssh/known_hosts.It is also possible that the DSA host key has just been changed. If there is no entry already in place on your machine, you will simply be prompted to approve the connection by entering yes at the prompt.Add correct host key in /root/.ssh/known_hosts to get rid of this message.Offending key in /home/ccm/.ssh/known_hosts:46.On some operating systems, when you first log in to the CLI, you may be prompted to add the key fingerprint of the Oracle VM Manager host to the /.ssh/known_hosts file, for example: ssh -l admin hostname -p 10000, the authenticity of host ' hostname.We just took the line number 46 which ssh complains about and run in in-place-editing mode (-i) with the command run on line 46 the command delete (d).At least from the last issue in Debian-based systems including Ubuntu you might know the pain of getting the message from you ssh client that the server host key has changed as ssh stores the fingerprint of ssh daemons it [email protected] iT IS possible that someone IS doing something nasty!Small lesson learned about sed.Either way, you'll need password auth set up for your account on the server, or some other identity or access method to get to the authorized_keys file on the server.Offending key in /.ssh/known_hosts:[email protected] hostname 's password: If you want to avoid this message and have host keys automatically added to the known_hosts file, you can turn off strict checking of SSH host keys using the following command: ssh -o 'StrictHostKeyChecking no' [email protected] hostname, if you have upgraded.Someone could be eavesdropping on you right now (man-in-the-middle attack)!