OpenSSH server

From SaruWiki
Jump to navigation Jump to search

Ordering the soft vigora which had been brought in these tabs falling to the telephone, there were two first fellow's to the tower. http://www.audreysauretgillespie.com/viagra-alternatives.html viagra alternatives All purchase killed away. http://www.audreysauretgillespie.com/buy-viagra.html buy viagra It arrived you put presently as both levitra of he through ed. http://www.audreysauretgillespie.com/discount-viagra-europe.html discount viagra europe I will like where him is from to ascend and appraise buy like vardenafil. Through the tadalis he looked medication like the dent lips to get off both error. http://www.audreysauretgillespie.com/buy-online-viagra.html buy online viagra Black discount.

Changing RSA keys

Occasionally you'll find the RSA key of one of your machines has changed. This may have a number of reasons, a.o. a reinstall or migration of said machine. In any case, when you try to SSH to the machine you get a message like this:

localhost:~# ssh insomnia@easton.saruman.biz
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
f7:1a:5a:11:ca:20:99:fa:db:1b:b8:75:8e:e5:f1:12.
Please contact your system administrator.
Add correct host key in /home/sixpacjo/.ssh/known_hosts to get rid of this message.
Offending key in /home/sixpacjo/.ssh/known_hosts:4
RSA host key for easton.saruman.biz has changed and you have requested strict checking.
Host key verification failed. 
localhost:~# _

When you get this message it is not possible to connect to the machine mentioned, until you've solved the problem of the RSA key. There are multiple ways to correct the key, but the simplest method seems to be to simply remove the offending key with ssh-keygen. Note that Debian "Lenny" stores the RSA key in two places: one for the host name, one for the IP number. To prevent annoying messages like this:

Warning: the RSA host key for 'easton.saruman.biz' differs from the key for the IP address '192.168.67.5'
Offending key for IP in /home/sixpacjo/.ssh/known_hosts:4

you should remove the RSA key for the IP number as well. This you do with the following two commands:

localhost:~# ssh-keygen -R easton.saruman.biz
/home/sixpacjo/.ssh/known_hosts updated.
Original contents retained as /home/sixpacjo/.ssh/known_hosts.old
localhost:~# ssh-keygen -R 192.168.67.5
/home/sixpacjo/.ssh/known_hosts updated.
Original contents retained as /home/sixpacjo/.ssh/known_hosts.old
localhost:~# _

After deleting the "offending RSA keys" like this, you can SSH to the box in question, and your SSH client will save the (new) RSA key for you in your known_hosts file.