ssh failed to login in remote connection

i am in node acbs01b and i use the root@fcbs01b to login and i have the below message .

ssh root@fcbs01b
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
28:a5:3f:25:97:84:f2:e6:27:7f:e4:8d:7a:9e:c3:18.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:7
RSA host key for fcbs01b has changed and you have requested strict checking.
Host key verification failed.
 

It means what it says. If the server was replaced for some reason this could happen, and you can get rid of this message by deleting the line it complains about. Otherwise, investigate what happened to make the server's ID change.

It's all in the message. The remote hosts ID has changed, which means that either

  1. someone has changed the SSH keys of the remote host, possibly by re-installing the service or the complete OS or
  2. someone is attempting a man-in-the-middle attack, trying to snoop in on your connection

Either way you should try to verify the key, either by looking at the system yourself or asking the systems administrator for the new fingerprint, and not establish connections until you've had that verification.

the server was crashed and i restore it from other copy

---------- Post updated at 06:03 PM ---------- Previous update was at 06:01 PM ----------

i am the sysadm and i need to login in to node B without writing the password for the node B

You can then

1) edit your /root/.ssh/known_hosts

2) remove the line refering to the host you are trying to reach (fcbs01b)
(you can make copy of the known_hosts file in *.old or whatever at first if you don't feel confortable with deleting the line without having a copy)

3) connect again ssh root@fcbs01b

4) answer "yes" when prompted. (the corresponding host key will be regenerated in your /root/.ssh/known_hosts)

5) you should be connected now

That's why the ID changed, then -- your backup had a different ID than you have now... or you didn't back up the ID and it generated a new one.

Delete the offending line and it should start letting you login again.

If you restored user files, hopefully it'll have restored your ~/.ssh/ files with it which will allow passwordless logins like before.

thank you all now it works fine for all servers :slight_smile: