简体   繁体   中英

Setting up a server on Google Cloud Platform

I spun up a Ubuntu 16.04 VM on Google Cloud Platform and tried following steps one to three on setting the VM up .

Instead of ssh root@your_server_ip (step one), I just went to the console, clicked on the drop-down under the Connect column in "VM instances" and selected "Open in browser window". Then I followed steps two and three to create a new user and to give it root privileges.

Skipping the 'recommended' steps 4 and 5, I tried step 6 to do a test log in by activating the Cloud Shell. But ssh [user created in step 2]@your_server_ip , where your_server_ip is the "External IP" in the "VM instances" page results in "Permission denied (publickey)."

Why is this?

Martheen comment is right, you need to generate the ssh key pair in order to ssh.

As you are using the Google Cloud platform I will point you to the documentation related there. You can use the GCP ways to connect to the instance here .

Other methods to connect you can find here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM