If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
When you ssh to a new host for the first time, it adds the key to the list of known hosts. Can someone refresh my memory of which file this is? Thanks...
Originally posted by EnVoy: When you ssh to a new host for the first time, it adds the key to the list of known hosts. Can someone refresh my memory of which file this is? Thanks...
Better yet, how do I remove a known host?
The file(s) are in ~/.ssh/ (a hidden folder in your home folder) there are usually two files known_hosts and known_hosts2 depending on which protocol is used. You can edit the files with a text editor. The files have a single line for each host entry... the line is really long , typically several hundred characters. Because of this you must be careful that your text editor does NOT insert "helpful" newlines or carriage returns. I usually use vi to edit the known_hosts file(s). If you know the line number of the offending host it is as easy as: