Remote log on locally Ali cloud server prerequisites

Ali cloud before the remote login ECS instance, what prerequisites need to meet?

In this example, the local system is windows and linux will do, Ali remote cloud server is a linux system.

Before ssh remote connection locally, you need to do the following preparations:
First, create a cloud Ali ECS instance key, download a pem file saved locally;
Here Insert Picture Description
after good creation, chrome is automatically downloaded, find this suffix for the pem file.
Second, the key binding instance, and restart the instance into effect;
the right binding instance
Here Insert Picture Description
restart the instance:
Here Insert Picture Description

Third, add an instance of the security set of rules, open port 22 for ssh;
click the security group, configuration rules,
Here Insert Picture Description
see the direction of the 22 ports on the line
Here Insert Picture Description
four, windows and linux difference between
a local for the windows, it is recommended to use putty connection, you puttygen need to download and Putty
puttygen used to convert the file to pem ppk file,
Putty used to remotely connect to the server
2, linux does not require additional operations

Fifth, modify Ali cloud instance of ssh configuration file
advanced Rua Li cloud instance management terminal, edit the configuration file ssh. This prevents connection timeout, the connection will not connect again.

Sshd_config file editing:
the sudo VI / etc / SSH / sshd_config
enters Edit mode: I
in the middle with these three:
ClientAliveInterval 60
ClientAliveCountMax. 3
MaxSessions 10
to exit edit mode: ESC
Exit editing interface file: Press shift + z + z (also It is two uppercase)

Editing ssh_config file: sudo vi / etc / ssh / ssh_config
to enter edit mode: i
in the final with these two sentences:
ServerAliveInterval 60
ServerAliveCountMax 3
to exit edit mode: ESC
to exit the file editing interface: Hold down the shift + z + z (that is, 2 uppercase)

Here Insert Picture Description

I was putty in the operation, the interface does not look good, but the same content.

Restart the ssh service: service ssh restart or service ssh reload

Next windows or linux can be connected.
I can see another article:
Local windows remote login first instance ECS

Published 21 original articles · won praise 32 · views 3083

Guess you like

Origin blog.csdn.net/Jacky_kplin/article/details/102993996