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!
Search vscode on Baidu (note that it is not visual studio) and enter vscode official website Download. [Recommended learning: vscode tutorial, Programming teaching]
Extensions tab on the left, search for remote in the input box, and select to install Remote-SSHPlug-in.
SSH TARGETS, as shown in the figure below:
C:\Users\chaxun\.ssh\config .
SSH TARGETS:
Connect to Host in Current Window:
/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!