by Devin Yang
(This article was automatically translated.)

Published - 7 years ago ( Updated - 7 years ago )

Recently, I just started using Google's GCE, and I will record the official Goolge documentation on how to generate a key for the instance to use.
The -C comment here will use the name of the logged-in user, and the -t will use rsa.
ssh-keygen -t rsa -f ~/.ssh/ccc-gce -C [USERNAME]

Then put the newly added key into the metadata.


You can specify this key for SSH public key verification on your computer.
The following are, schematic instructions:
ssh -i ~/.ssh/ccc-gcp devin@ccc.tc
Enter passphrase for key '/Users/devin/.ssh/ccc-gcp':
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.10.0-33-generic x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage

Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud

49 kits can be updated.
0 are security updates


*** System restart required ***
Last login: Sat Oct 7 08:43:55 2017 from 61.228.24.27


Google's official full description is as follows:
connecting-to-instance

 

Tags: linux

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


linux

haproxy 1.8.9 compilation record

Record the process of compiling haproxy 1.8.9 under Ubuntu.

linux,cli

How to use the date command to display yesterday's date

The instructions are different on MacOS or Linux, but achieve the same effect. Let's see how to display yesterday's date with the date command.

linux,mac

Password Generator on MacOS or Linux

Sometimes we need to generate a random password, but do not know what to use? Here is a simple bash that allows us to easily generate a set of passwords on the terminal.