I'm trying to script the copying of public keys to multiple machines.
ssh-copy-id checks whether it can log in with the current configuration before copying, but unfortunately this includes any
IdentityFile entries in
~/.ssh/config. I would like to completely ignore
~/.ssh/config; is there some way to do that, or to force
ssh-copy-id to always add the key? This does not work:
ssh-add "$old_key" ssh-copy-id -i "$new_key" -o "IdentityFile $new_key" "$login"
This is similar to, but distinct from How can I make ssh ignore .ssh/config?.