673650096
By:
673650096

why is connection closed?

December 13, 2014 2.1k views

step 1: I reboot, and the connection is closed.
step 2:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

I removed the known_hosts
step 3: I can connection my server. But, Warning: Permanently added '104.236.158.122' (RSA) to the list of known hosts. Then, I enter my password. When it comes to changing my password, connection is closed..

1 Answer

Hello dear
If you have reinstalled Linux or UNIX with OpenSSH, you will get the above error. To get rid of this problem:

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

Remove keys

Use the -R option to removes all keys belonging to hostname from a known_hosts file. This option is useful to delete hashed hosts. If your remote hostname is server.example.com or 128.199.xxx.xxx , enter:

$ ssh-keygen -R {server.name.com}
or

$ ssh-keygen -R {128.199.xxx.xxx}

and then

$ ssh-keygen -R server.example.com

Sample output:

/home/vivek/.ssh/known_hosts updated.
Original contents retained as /home/vivek/.ssh/known_hosts.old

Now, you can connect to the host without a problem.

Have a nice day

Have another answer? Share your knowledge.