©2015 - 2022 Chad’s Technoworks. Disclaimer and Terms of Use

Chad’s TechnoWorks My Journal On Technology

Information Technology

VIRTUAL BOX GUEST OS INSTALLATION - page 7

 Prev< 1 2 3 4 5 6 7

How To Fix MacOS SSH Remote Host Identification Change

There are times I’d be reinstalling the Guest OS on certain lab exercises. This will cause to have a new RSA key generated for the SSH server process. Your MacOS SSH client detects this fingerprint change when accessing the new target host and would decline to proceed with the access.


Here’s a sample error you might see:


CTW-MBP15:.ssh chad$ ssh chad@lxnode14.vlabs.net

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@    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

SHA256:mbdgAf3Q3DSY+DxoZ23w/MxdX/BbRCOlfOTkbtcm+Rw.

Please contact your system administrator.

Add correct host key in /Users/chad/.ssh/known_hosts to get rid of this message.

Offending RSA key in /Users/chad/.ssh/known_hosts:63

RSA host key for lxnode14.vlabs.net has changed and you have requested strict checking.

Host key verification failed.

CTW-MBP15:.ssh chad$


To remedy the situation, you need to remove that old key from the known_hosts using the ssh-keygen utility.


Parameters to remove RSA keys:


 ssh-keygen -R hostname


Example:


CTW-MBP15:.ssh chad$ ssh-keygen -R lxnode14.vlabs.net

# Host lxnode14.vlabs.net found: line 63

/Users/chad/.ssh/known_hosts updated.

Original contents retained as /Users/chad/.ssh/known_hosts.old

CTW-MBP15:.ssh chad$