0

I have a VM in Google Cloud. I added my public key by browser session into .ssh/authorized_keys folder (I have stable internet connection).

I am trying to connect to this machine from console as usual:

 ssh -v myname@ipaddress

I just see:

OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to ipaddress [ipaddress] port 22.

And nothing happens. How can I solve this problem?

2
  • are you able to telnet the instance? like #telnet ip_address 22 – Corleone May 12 '18 at 15:50
  • Start the VM. Open the port in the firewall. – Michael Hampton May 13 '18 at 9:06
1

If you want to use public-key authentication for SSH, you can add that key as a metadata field in an instance or in a project. If you set it instance-level, you'll only be able to use that key on that specific instance; setting it project-wide enables its usage for all instances in that project.

Follow this guide on how to set SSH public keys.

-1

Try to add the public key on the meta data ssh key

1
  • 4
    This needs more explanation – Sven May 13 '18 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.