Ssh secret key is generated and fast connection servers in the cloud mac

  Ali cloud servers open today when the need for secret key pair, had three months ago, many teachers have taught me once, and the results today I forgot how a set of keys, so remember it.

  Process is as follows:

  1, the terminal is opened;

  2, run the command to generate keys:

keygen-SSH -t -C RSA   ' your [email protected] '
 
- T specified key type, i.e. RSA default, may be omitted
 -C disposed comment text, such as your mailbox, you may be omitted

  3, on the generated secret key is stored in ~ / .ssh the directory, respectively public and private id_rsa id_rsa.pub;

  4, which is the need id-rsa.pub public key comprising a public key remember ssh-rsa foremost portion.

 

  Next is how to quickly connect the cloud server, originally by Ali cloud background management interface, click to enter the cloud server interface "remote connection", but now there are more convenient ways to enter the cloud through a terminal server directly. There is a premise that is set in advance in the configuration ssh public good cloud server.

  Process is as follows:

  1, the terminal is opened;

  2, is connected by entering the command:

ssh username @ server ip

  Where "username" is my server centos system, the default user name is root; "server ip" is the server where the public network ip, can be viewed by Ali cloud admin page;

  3, the next will be asked whether to access, enter "yes", then enter it on the connection after a root server corresponding password.

  4, using the "exit" sign out connection, use "who" see the ssh connection.

 

Guess you like

Origin www.cnblogs.com/potatorain/p/11427384.html