SSH Issue faced while connecting Linux servers from Jump-box
SSH Issue faced while connecting Linux servers from Jump-box, most of the time we face this issue in AWS.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ECDSA key sent by the remote host is
SHA256:xxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxx.
Please contact your system administrator.
Add correct host key in /home/ec2-user/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/ec2-user/.ssh/known_hosts:12
ECDSA host key for x.x.x.x has changed and you have requested strict checki ng.
Host key verification failed.
Most of you have faced this issue. to resolve this we want to remove the Key from Known_host file
By default it will be in /home/username/.ssh/known_hosts path
You can check which all IP’s are already their in that file by giving command Cat /home/username/.ssh/known_hosts
Once you got the IP which your facing issue run the below command which will remove it and you can use the Jump box as earlier.
ssh-keygen -R x.x.x.x
After you remove that entry you can ssh to that instance as earlier
I hope this blog has helped you to resolve the SSH Issue faced while connecting Linux servers from Jump-box.
Before this you should be knowing the configuration of pagent which will forward the session.
Most of this issue will comes in AWS. To get more blogs on AWS you can go to this link