I am trying to copy an SSH public key on several EC2 instances.
ssh-copy-id man page, when you pass the key file, the program adds
.pub extension if it missing.
AWS keys are generated are
.pem format, and I can use this workaround:
ssh-keygen -y -f my-new-key.pem | ssh user@host \ -i already-on-remote-server-key.pem 'cat > ~/.ssh/authorized_keys'
But the doubt remains... Is it possible to use
ssh-copy-id with a
.pem file or the only solution is to use a workaround?