Most guides for OpenSSH configuration advise to disable password authentication in favor of key-based authentication. But in my opinion password authentication has a significant advantage: an ability to connect from absolutely anywhere without a key. If used always with a strong password, this should not be a security risk. Or should it?
user962449
Asked:
2011-10-23 11:24:10 +0800 CST
Samuel Edwin Ward
Asked:
2011-10-14 06:01:26 +0800 CST
Trying to ssh into a computer I control, I'm getting the familiar message:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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.
The fingerprint for the RSA key sent by the remote host is
[...].
Please contact your system administrator.
Add correct host key in /home/sward/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/sward/.ssh/known_hosts:86
RSA host key for [...] has changed and you have requested strict checking.
Host key verification failed.
I did indeed change the key. And I read a few dozen postings saying that the way to resolve this problem is by deleting the old key from the known_hosts
file.
But what I would like is to have ssh accept both the old key and the new key. The language in the error message ("Add correct host key
") suggests that there should be some way to add the correct host key without removing the old one.
I have not been able to figure out how to add the new host key without removing the old one.
Is this possible, or is the error message just extremely misleading?
Justin
Asked:
2011-09-02 14:33:05 +0800 CST
Jon
Asked:
2010-02-25 02:57:39 +0800 CST