Skip to content

Instantly share code, notes, and snippets.

@rms1000watt
Created June 1, 2016 19:37
Show Gist options
  • Save rms1000watt/3cb247ae5b7ffbaf5da2009098ed8807 to your computer and use it in GitHub Desktop.
Save rms1000watt/3cb247ae5b7ffbaf5da2009098ed8807 to your computer and use it in GitHub Desktop.
Remove an SSH key if a key changes on a machine (like if a new VM is generated but had an old IP address).
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# @ 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
# f0:6f:50:f0:13:96:32:67:99:79:14:59:b6:32:16:16.
# Please contact your system administrator.
# Add correct host key in /Users/ryan/.ssh/known_hosts to get rid of this message.
# Offending RSA key in /Users/ryan/.ssh/known_hosts:33
# RSA host key for 192.168.1.33 has changed and you have requested strict checking.
# Host key verification failed.
ssh-keygen -R 192.168.1.33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment