When working a remote machine over SSH I prefer running a tunnel
First, we install vs-code
curl <https://vscode.download.prss.microsoft.com/dbazure/download/stable/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/code_1.95.3-1731513102_amd64.deb> > vscode.deb
sudo dpkg -i vscode.deb
rm vscode.deb
sudo apt --fix-broken install
curl -Lk '<https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64>' --output vscode_cli.tar.gz
tar -xf vscode_cli.tar.gz
code tunnel --accept-server-license-terms
Complete this process and authenticate with Github
<aside> ❗
Create a service
code tunnel service install
</aside>
sudo nano /etc/systemd/system/code-tunnel.service
[Unit]
Description=VSCode Tunnel as Daemon
[Service]
Type=simple
ExecStart=/usr/bin/code tunnel
User=USERNAME
Group=GROUP
Restart=on-failure
[Install]
WantedBy=multi-user.target
Replace USERNAME
and GROUP
with your own
Enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable code-tunnel
sudo systemctl start code-tunnel
Check its status
sudo systemctl status code-tunnel
You will see a url such as https://vscode.dev/tunnel/folder-name
Access it and you can use VSCode in the browser to work on your remote