Home > Development Tools > VSCode > body text

Teach you step by step how to use vscode to connect to a remote server

青灯夜游
Release: 2022-12-21 20:50:15
forward
3602 people have browsed it

How to encode on the remote server? Preferred vscode! ! ! Of course, there are many other options, such as sublime, ultraedit, etc. Here we use the very popular vscode to connect to the ubuntu server for explanation!

Teach you step by step how to use vscode to connect to a remote server

#1. Download vscode

Search vscode on Baidu (note that it is not visual studio) and enter vscode official website Download. [Recommended learning: vscode tutorial, Programming teaching]

##2. Install the ssh plug-in

Select the corresponding version according to your operating system to download and install. After the installation is complete, start vscode, select the

Extensions tab on the left, search for remote in the input box, and select to install Remote-SSHPlug-in.

After the installation is complete, a new tab, Remote Explorer, will be added on the left, as shown below:

3. Add server connection configuration

Click this tab and you will enter the addition of

SSH TARGETS, as shown in the figure below:

Click the Add button, enter the address of the remote server, and modify the account number and IP according to your own situation, as shown below:

After saving, the connection information will be stored in

C:\Users\chaxun\.ssh\config .

At this point you can see the added remote server address in

SSH TARGETS:

4. Connect to the server

Right-click to select the remote server and click

Connect to Host in Current Window:

If the remote server can be connected successfully, you will be asked to enter the password:

5, Basic operations

For example, if I click Open Folder, you will be asked to choose the file directory to open:

             Click the ok button to open

/home/zhaxun After that, you will need to enter the password again:

If the above steps are successful, you will see all the files in the remote server directory in the file tab:

At this point, you can add, delete, modify, and check files just like operating local files!

Deleting files, renaming and other operations can be found in the right-click menu:

Of course, you can too Use shell commands in the terminal to operate!

What should I do if I want to open the remote server next time? This information will be stored in Remote Explorer, as shown in the figure below. At this time, you only need to right-click to open it again!

At this point, we have explained the detailed process of connecting vscode to the remote server!

For more knowledge about VSCode, please visit: vscode Basic Tutorial!

The above is the detailed content of Teach you step by step how to use vscode to connect to a remote server. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template