An overview of the
Visual Studio Code(hereafter referred to as VS Code) provides the ability to edit files in remote development environment locally from version 1.35.0.
This experiment uses Ubuntu Server 18.04 as the remote development environment and MacOS as the local machine. The goal is to be able to edit files for a remote development environment on MacOS with VS Code installed.
Configure encryption-free remote login
Generate a key pair on the local machine:
ssh-keygen -t rsa -C "[email protected]"
Copy the code
The generated path is ~/.ssh/
Copy the public key to the server:
SSH - copy - id [email protected]Copy the code
To log in to the server after adding, simply enter [email protected] to directly enter the server, no password is required.
VS Code remote development extensions
Install Remote Development by searching for Remote in the VS Code extension store.
use
Run CMD + Shift + P to invoke the command and run remote-ssh :Connect to Host… And then select the path to the configuration file
Then enter the primary key information:
Then run remote-ssh :Connect to Host to Connect to the server.
After the connection is successful, you can edit remote files as if they were local files.
provenance
Welcome to follow the author’s public account and get more dry goods.