Article directory
1. vscode installation
Vscode official website download address: https://code.visualstudio.com/
The installation is very simple: you can install it in the default way, step by step without thinking, and it's OK
2. vscode plugin installation
(1) Chinese interface settings
- Click to the left
扩展
, then enterchinese
, then click安装
. - Then press
shift+ctr+p
,命令
the panel will pop up, inputdisplay
, then配置显示语言
select, select again简体中文
, at this time it prompts that a restart is required, clickrestart
to complete the configuration of the Chinese interface.
(2) ssh remote plug-in installation
Click the extension icon on the left, enter ssh
, select Remote-SSH
, and click Install.
- Remote connection configuration
Click远程连接
the icon on the right, then click设置
the icon, and then select.ssh\config
, configure remote connection.
You can fill it inHost
casually;HostName
fill in the address of the remote connection deviceIP
,User
and fill in the login用户名
, so that the configuration of the remote connection is set.
3. Password-free login
It is very troublesome to enter it every time you remotely log in to the server 密码
. Next, we will introduce the method without entering a password.
Step 1 : CMD
Open the windows terminal and enter the following code to generate秘钥
ssh-keygen -t rsa -b 4096
The option to be selected pops up, just press Enter
Enter. After the key is generated, the terminal will display 秘钥
the storage address as follows:
Find the key file saved in the C drive according to the path id_rsa.pub
, as follows:
Step 2 : Log in to the linux server and create .ssh
a folder under the home directory (/home/yuanwushui(username))
mkdir .ssh
- Place
windows
the generated , uploaded under folder秘钥文件:id_rsa.pub
on the server ..ssh
- It can be uploaded by scp or any other method. The method of scp upload is as follows:
cd .ssh
scp id_rsa.pub [email protected]:.ssh/ # yuanwushui 为用户名 10.0.8.21 是远程服务器的ip
Step 3 : .ssh
Create authorized_keys
a directory under the server directory, execute the following script to create
cat id_rsa.pub >> authorized_keys
Step 4 : Log in to the remote again in vscode, and you can log in to the remote without a password at this time