Record: VsCode connects to Alibaba Cloud via ssh

0 reference

Reference [1]: How to connect to the Linux system on Alibaba Cloud via SSH

1 Aliyun server

Buy an Alibaba Cloud server, and novices will get one month as a gift.

server settings

01 Enter the management interface

insert image description here

02 Reset password for first use

insert image description here

03 After setting, the server needs to be restarted to take effect

insert image description here

04 After restarting, re-enter the management interface and create a key pair

insert image description here
insert image description here
insert image description here
important! Save the created key pair

05 Binding key pair

06Create a security group (external settings linked via SSH)

insert image description here
insert image description here
insert image description here

07 Obtain the instance (server) ip address

insert image description here

2 local

1 Download and install VsCode

2 Install the plugin

insert image description here

3 configuration files

Reference [2]: VSCode uses Remote SSH to connect to remote servers
insert image description here
and modify configuration files
insert image description here

Host <remote host name>
HostName <remote host IP>
User <username>
Port <ssh port, default 22>
IdentityFile <local SSH private key path, saved above>
ForwardAgent yes <VSCode added by itself, don't care>

3 links

Reference [3]: Use VScode to connect to Alibaba Cloud remote server
insert image description here
Select the host name of the link
insert image description here
ctrl+~ to call the terminal
insert image description here

Guess you like

Origin blog.csdn.net/qq_42911863/article/details/125624036