Disable ssh known_hosts for local network

So if you are like me and are always playing with operating systems and computers, you probably get tired of removing ssh known_hosts entries so you can get past the:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ECDSA key sent by the remote host is…….

 

First delete your ~/.ssh/known_hosts file

Then:

a) To disable for all users put the entry below in the global SSH configuration file ‘/etc/ssh/ssh_config’

b) To disable for one user, put the entry below in the configuration file in the user’s folder ‘~/.ssh/config’

To disable key checking for all machines in the 192.168.0.0/24 submit enter:

Host 192.168.0.*
   StrictHostKeyChecking no
   UserKnownHostsFile=/dev/null

Leave a Reply

Line and paragraph breaks automatic.
XHTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>