[MacOS 10.12.6 host, Ubuntu 14.04 LTS guest]
I have a local VM setup to only accept publickey authentication. Until now, I've been using a key that requires a passphrase to be entered, and the arrangement works fine. However, I now need to setup a script to automatically perform a scp for me.
As I neither want to have the script pause for me to provide the passphrase nor use
expect to do that automatically, I've decided to use a second key that does not have a passphrase.
It appears to me that
ssh-copy-id is not able to handle this situation as it uses the
-i parameter to tell it which key to upload, and therefore I cannot specify which key to login with.
So, my question is, how to get
ssh-copy-id accept a second key that would be used to login in the first place? Should I use
(In light of my above hick-up with
ssh-copy-id, I've manually copied and added the key to my authorized_keys file.)