Vs code remote development plug-in remote SSH

Little Joe 2021-09-15 10:57:14

Remote-SSH Plug in installation

The extension can be through VS Code Expand the store to install , Search in the extension store for Remote-SSH, After you find it, install it , Here I have installed , I won't go into details . After successful installation , The following icon will appear :

image.png

Configure private key

  • Use ssh-keygen Tools are created locally ssh Secret key , When creating, press enter all the way ( Be careful :Remote-SSH The plug-in does not support the connection method of entering account and password , The preferred login method is asymmetric key login )
  • Input ssh-keygen, Enter direct generation
  • The input terminal cat id_rsa.pub, There's something you need ssh key
  • take ssh key Copy , Then fill in git Just above

Remote-SSH Use

Connect

  • To configure : Click the small button of setting , Then the second step is to select the first , You can also select the second file for configuration , As shown in the figure below

image.png

image.png

The configuration file is shown below :

image.png

  1. Host: The name of the connected host , You can customize
  2. Hostname: Remote host IP Address
  3. User: user name
  4. Port: The port used to log in to the remote host
  5. IdentityFile: The path of the local private key
  • Connect : installed Remote After the plug-in , Will be in VS Code An area connecting the remote window appears in the lower left corner of the editor , After clicking, the drop-down options , Connect , We choose , Then enter the user name and host, Confirm connection

image.png

image.png

Development

The following figure shows the status of the connection , Already connected to the host of the server

image.png

Click to open the folder , Select the file directory to be developed , Open the directory corresponding to remote development in the following way :

image.png

image.png

Other similar articles :

juejin.cn/post/694606… juejin.cn/post/684490…

Please bring the original link to reprint ,thank
Similar articles

2021-09-15

2021-09-15