While trying SFTP/ SSH: One may observe below error :
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
SHA256:7nYKseap6dAOZ2jb+ExnHUluNtqbz46AUXw14NCO1hk.
Please contact your system administrator.
Add correct host key in /home/myuser/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/myuser/.ssh/known_hosts:42
RSA host key for mysftp.sftp.com has changed and you have requested strict checking.
Host key verification failed.
Couldn't read packet: Connection reset by peer
@ 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
SHA256:7nYKseap6dAOZ2jb+ExnHUluNtqbz46AUXw14NCO1hk.
Please contact your system administrator.
Add correct host key in /home/myuser/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/myuser/.ssh/known_hosts:42
RSA host key for mysftp.sftp.com has changed and you have requested strict checking.
Host key verification failed.
Couldn't read packet: Connection reset by peer
Solution - Do one of the following-
- use ssh-keygen to delete the invalid key
ssh-keygen -R "you server hostname or ip"
- Modify ".ssh/config" and turn off strict host checking. This can be done by updating/ making an entry as below.
Host 101
HostName yourip|hostname
IdentityFile /path/to/keyfile
StrictHostKeyChecking no
I would restrain from option #2 above. As, it may lead to man in middle attack.
Comments
Post a Comment