« More about ms replacement | Home | Power outage this morning »

May 25, 2016

New ssh key on ms & dealing with the alarming warning

When we replaced (the problem-having Mageia version of) ms last week (with a fresh, shiny, CentOS version), it got a new ssh identity key.   If your account + computer has saved the old key from prior ssh/sftp sessions, you will see a warning something like the one shown below.

To get rid of that warning, purge your ssh known-hosts file of the old key like so (from linux, OS X, or MobaXterm):

ssh-keygen -R ms
ssh-keygen -R ms.mcmaster.ca

Update 2016/06/02: to be more thorough, run this command, too:

ssh-keygen -R 130.113.105.93

Or there is the nuclear option, which will clear all host records on the current computer + account:

\rm ~/.ss/known_hosts

You may need to do this on more than one account + host.
Here is an example of the warning:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
0f:e2:79:49:97:ef:29:a4:95:c5:70:5e:6a:0c:82:68.
Please contact your system administrator.
Add correct host key in /Users/earn/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/earn/.ssh/known_hosts:32
RSA host key for ms has changed and you have requested strict checking.
Host key verification failed.

Monthly Archives

About this Entry

This page contains a single entry by published on May 25, 2016 1:29 PM.

More about ms replacement was the previous entry in this blog.

Power outage this morning is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.