I've setup 2 Google Compute Engine instances and I can easily SSH in both of them by using the key created by gcloud compute ssh command. But when I try the following...
myself@try-master ~] ssh-keygen -q -t rsa -N "" -f ~/.ssh/id_rsa
myself@try-master ~] cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
myself@try-master ~] chmod 0600 ~/.ssh/authorized_keys
myself@try-master ~] ssh-copy-id -i ~/.ssh/id_rsa.pub myself@try-slave-1
... it does not work, and ssh-copy-id shows the message below:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
If I copy the google_compute_engine private and public key on try-master, and can use it to log on both instances, but I find unsatisfactory to move a private key over the network. I guess this is somewhat related to this topic:
How can this be solved?
[1] https://cloud.google.com/compute/docs/instances#sshbetweeninstances