Implementation of remote development and debugging of vscade remote development

Time:2021-3-17

brief introduction

To me

Modify and debug the server code directly. Of course, you can install plug-ins, including code completion. It’s the same experience as using local vscode.

Directly edit, modify the server’s file, use the code filename. OK

to configure

Server installationssh-server

They usually bring their own. proposal

usessh localhostCommand to generate the. SSH directory.

Easy to configure key login, instead of cumbersome password login.

client

Install the plug-in, remote development

是这个哦~

Install plug-in, remote SSH

是这个哦~

to configure

Be sure to modify the default configuration file. My answer is: D:\ zk.ssh \config

Because the default is: C disk. SSH under the config file, will conflict with the shell, of course, there is a solution, but it is very troublesome. So take this approach.

很重要~

Password free login

premise

1. make the. SSH directory under the root directory of the server to store the relevant SSH information. If not, it will be
ssh localhost

Then there is the directory.

2. install openssh on windows. Do you have a look? Try running SSH in power shell.

Click to see the official address of and GitHub

text

1In the client, the private key and public key are generated in the. SSH folder of the user directory~

ssh-keygen -t rsa

2. put ID_ rsa_ Pub to the / root /. SSH folder of the server~

scp /path/filename [username]@[ip address]:/path

Example:scp id_rsa.pub [email protected]:/root/.ssh

Of course, you can also pull to the server.

3. on the server, set the ID_ rsa_ Pub to authorized_ Keys and set the permission to 600

mv id_rsa.pub authorized_keys
chmod 600 authorized_keys

connect

Using Ctrl Shift + P, enterremote-ssh

这里哦~

The first is what I’ve built~

choiceadd new ssh hostperhapsconfigure ssh hosts All right.

这里o~

clickconfigure ssh hostsAfter that, select the new folder you created, which is the new configuration file you configured at the beginning. Of course, you can see it~

Alias custom host
 Hostname IP address
 User root

Right click to connect~

~~~

The finished product looks like this~

连接成功~

Let’s end free play~
Free to edit server, install files, etc~

自由玩耍~

summary

This article about remote development and debugging of vscode remote development is introduced here. For more related vscode remote development and debugging content, please search previous articles of developer or continue to browse the following related articles. I hope you can support developer more in the future!