If you’re like me, and you have thousands of systems running ssh, and you want to ssh to all of them, you will get really familiar with the following:


The authenticity of host '10.97.56.242 (10.97.56.242)' can't be established
but keys of different type are already known for this host.

As fun as it may be to type ‘yes’ over and over again for practice, there is a better way:

ssh-keyscan -f ips-to-check.txt -t rsa >> ~/.ssh/known_hosts

Where ips-to-check.txt is a list of all the ips, 1 per line.

Related posts:

  1. Thats what I call innovation