VScode remote connection server

VScode remote connection server

1. Remote server installation rmate, perform the following operations on a remote server

wget https://raw.githubusercontent.com/sclukey/rmate-python/master/bin/rmate
chmod +x ./rmate
sudo mv ./rmate /usr/local/bin/rmate

2. Install openssh locally

  • Log-free dense
    executed locally cmd window
ssh-keygen -t rsa

The generated secret key id_rsa.pub uploaded to the server home directory and execute

cat ~/id_rsa.pub >> ~/.ssh/authorized_keys

If you do not own authorized_keys file is created

3. Install remote vscode extension


After the installation is complete, the panel click Start Server, start the service (this step is necessary)

to open the terminal after running

ssh -R 52698:127.0.0.1:52698 用户名@地址 -p ssh端口(一般是22)

Guess you like

Origin www.cnblogs.com/qujingtongxiao/p/11544388.html