The remote-SSH plug-in is installed
The extension can be installed via the VS Code extension store, where you can search for remote-ssh and install it. I’ve already installed it so I won’t go into details. After successful installation, the following icon will appear:
Configure the private key
- use
ssh-keygen
Note: The Remote SSH plug-in does not support the connection mode of entering the account password, and the preferred login mode is asymmetric key login. - Enter ssh-keygen and press Enter
- Enter cat id_rsa.pub to obtain the SSH key
- Copy the SSH key and add it to Git
Remote – use SSH
The connection
- Configuration: Click the small button of setting, and then choose the second step to select the first one or the second file for configuration, as shown in the picture below
The configuration file is as follows:
Host
: Indicates the name of the connected host, which can be customizedHostname
: INDICATES the IP address of the remote hostUser
User name:Port
: Port for logging in to the remote hostIdentityFile
: Path of the local private key
- Connection: Complete installation
Remote
After the plugin will be inVS Code
In the lower left corner of the editor, there appears an area to connect the remote window. After clicking it, the drop-down option appears to connect. We select it and enter the user name and host to confirm the connection
The development of
The following figure shows the state of the completed connection, which has been connected to the host of the server
Click open folder, select the file directory to be developed, and open the corresponding directory of remote development in the following way:
Other similar articles:
Juejin. Cn/post / 694606… Juejin. Cn/post / 684490…