Chris G wrote:
I have a shell login on host cheddar.halon.org.uk, while I was away for a few days recently (that bit's irrelevant really), cheddar.halon.org.uk was (presumably) moved to an new machine and thus its host key changed. So, when I came home, my passwordless login to cheddar.halon.org.uk failed with the usual ssh message about 'host key has changed', maybe a man in the middle attack, etc. I removed the relevant line from ~/.ssh/known_hosts, logged in again, the correct line was added to ~/.ssh/known_hosts and all was well again, or so I thought. However, it doesn't all work again as it did:- Any ideas as to what else might have been affected by the host key change at cheddar.halon.org.uk? It's possible some previous misconfiguration was masking something such that the passwordless login was working for some other reason than the config file above but I still need to sort it out.
This might be just a case that the remote system no longer has a copy of your public key(s) in an authorized_keys file for your user. Passwordless login relies on the copying of the contents of, for instance, local:~/.ssh/id_rsa.pub to remote:~/.ssh/authorized_keys on the remote system (there can be many of these keys in that one file). It's not unreasonable to think that these files have been missed (or even deliberately not copied) on migration.
Another option is that an existing (remote) authorized_keys has had its permissions changed away from 600 to something else (ssh will, depending upon configuration, disallow passwordless connections unless this file is only owned by the user).
Hope that helps,
Simon