简体   繁体   中英

Google Cloud Platform - SSH/Telnet

I am running apps on Compute Engine. I run on a Windows box and use Putty to connect to the CE. This pretty much seems to work fine (leaving aside the problems in the Google doc on this).

I have set up another user who I want to enable for SSH (on a Mac) and have her use FileZilla to push files to the CE.

I am trying it out on my own Mac. I set up 2 firewall rules with 2 different priorities for tcp:22 =

myssh Apply to all  IP ranges: 0.0.0.0/0 tcp:22 Allow 1000 default
default-allow-ssh Apply to all IP ranges: 0.0.0.0/0 tcp:22 Allow 65534 default

The user has permissions on of the Project of: "Compute Instance Admin(v1)"

On the Mac terminal I do the following:

ssh-keygen -t rsa -f ~/.ssh/userfirstname-ssh-key -C [googleusername.gmail.com]

I go to the GCP CE Meta data (logged in as myself) and then copy the contents of the userfirstname-ssh-key.pub to the Metadata/SSH Keys and save.

After GCP gives the ok on the key being added I enter the following in the Mac terminal:

ssh -i [userfirstname]-ssh-key [googleusername.gmail.com]@gcp-external-ip 

Depending on i-don't-know-what, sometimes it says "Permission denied (public key)", "Operation timed out"

I've repeated this a few times and just tried to telnet in to the gcp-external-ip and get "Operation timed out" telnet: Unable to connect to remote host.

At a complete loss. Please help.

You could (and should) use the gcloud command line tools. Then it is easiest to simple copy the correct gcloud command from the Web Console. There is a little drop-down menu next to 'SSH' for each of your instances.

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