0

ssh-copy-id root@34.71.159.89 /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys root@34.71.159.89: Permission denied (publickey). qaisarmughal69@lamp-upwork-1:~/.ssh$

I have a server public key i have to add it to my cloud VM and im not able to authenticate it after via command ssh root@34.71.159.89

1 Answers1

0

I'm not sure to fully understand your problem since their isn't any proper formatting to your question, but I think the problem is that you're not prompted for root's password, hence the Permission denied (publickey) error. This might be related to the possibility of Cloud Engine's VMs having the SSH option PasswordAuthentication set to no by default, but I'm not sure.

One way to authorize your SSH key would be to go in Google Cloud UI and then from the menu Compute Engine > Metadata add your public SSH key.

Another way would be to use Cloud Shell which should be able to connect via SSH to the VM. And then from there you could add your key manually by editing /root/.ssh/authorized_keys.