Question

why is connection closed?

Posted December 13, 2014 5.4k 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..

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
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

Submit an Answer