ssh-copy-id specifying which key and without password
You can pass ssh
options with -o
:
ssh-copy-id -i mykey.rsa.pub -o "IdentityFile hostkey.rsa" user@target
Yes, it is possible something like
ssh-copy-id -f -i hostkey.rsa.pub user@target
with latest version of ssh-copy-id
. If you have some older, it might or might not work (with RHEL7 and older Fedora with SSH_COPY_ID_LEGACY=1
environment variable)