3 ms·
Their instructions could stand to be more thorough. If you have hashed hostnames in your known_hosts, you don't just have to ssh-keygen -R github.com you
by tome 4y ago
Their instructions could stand to be more thorough. If you have hashed hostnames in your known_hosts, you don't just have to
ssh-keygen -R github.com
you also have to
ssh-keygen -R 140.82.121.3
which is the IP address for that host. Otherwise you'll get something like
Warning: the RSA host key for 'github.com' differs from the key for the IP address '140.82.121.3'
Offending key for IP in /home/tom/.ssh/known_hosts:77
Matching host key in /home/tom/.ssh/known_hosts:102
- jasongill 4y agoThere are numerous IP's that are reported for github.com. The easiest way to remove all of the offending known_host entries appears to be: sed -i.github-removed '/AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa/d' ~/.ssh/known_hosts
- St-Clock 4y agoThank you so much for this shortcut, I was trying a way to find all of the bad known_host entries and this did the trick!