1. Update vscode to 1.35+
2. Install the Remote Development package
3. Configuration:
SSH configuration:
Environmental preparation
- The local operating system uses win10 1809 and above, this version comes with Open SSH Client, which can save the configuration of ssh
Local win10 generated key pair
ssh-keygen -t rsa -b 4096 -f C:\DevEnv\conf\ssh\id_rsa-remote-ssh
Remote Linux host configuration
Upload the generated key pair (id_rsa-remote-ssh and id_rsa-remote-ssh.pub) to the corresponding user of Linux, and execute: (The server IP here is 10.110.1.99
ssh-copy-id -i id_rsa-remote-ssh.pub 10.110.1.99
It can also be configured manually, but through the ssh-copy-id command configuration, you can set appropriate permissions for the user's home directory (home) and ~/.ssh, and ~/.ssh/authorized_keys.
After completion, delete id_rsa-remote-ssh and id_rsa -remote-ssh.pub
Set the Remote-SSH plugin configuration file of vscode:
Host 10.110.1.99
HostName 10.110.1.99
User root
IdentityFile C:\DevEnv\conf\ssh\id_rsa-remote-ssh
Open the server file and start remote development (note that after the new version 1.45, here'remote resource manager' should select'SSH Targets')
Enter the password you just set:
Enter passphrase for key 'C:\DevEnv\conf\ssh\id_rsa-remote-ssh':
Select the folder where the code is located
Appendix: git upgrade under linux
Installation dependencies:
># yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc
># yum install gcc perl-ExtUtils-MakeMaker
Uninstall git1.8.3 that comes with Centos:
Check the version of the system through git --version, Cento6.5 should have its own git version of 1.8.3
># yum remove git
Download git2.22.0 and add git to the environment variable ( git download source file address )
- Download and unzip:
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.22.0.tar.gz
tar zxvf git-2.22.0.tar.gz
cd git-2.22.0
- Compile and install
make prefix=/usr/local/git all
make prefix=/usr/local/git install
-
View git
whereis git git –version
-
Configure environment variables
vim /etc/profile
adds export PATH=$PATH:/usr/local/git/bin to the
effective configuration file source /etc/profile
The first configuration, after trying for a long time, finally the configuration is good, the writing is not very perfect, if you have any questions, you can ask in the comment section