I want to have a server always running Live Share so that I don't have to always have a computer opening the VSCode window to keep Live Share alive. I tried to run Live Share on my server through Remote-SSH extension, however, when I close the window, the Live share will shut down along with the Remote-SSH session.
Is it possible to have Live Share always run on my server?
Live Share allows guests you invite to run console/REPL commands and there is therefore a risk of a malicious actor running a command you would not want them to run. Consequently, you should only co-debug with those you trust.
The Visual Studio Code Remote - SSH extension allows you to open a remote folder on any remote machine, virtual machine, or container with a running SSH server and take full advantage of VS Code's feature set. Once connected to a server, you can interact with files and folders anywhere on the remote filesystem.
SSH is a powerful tool for remote access. It allows you to log in and run commands on a remote machine just as if you were sitting in front of it. Many sysadmins use custom prompts for remote machines to avoid confusing a local terminal with a remote one.
A similar issue is described and resolved here Live share not working on Remote SSH session
According to that discussion thread there are three places to have "Live share" installed:
1) Locally in: local_machine:~/.vscode
2) Remotely in the VSCode server (via Remote Development (SSH)) remote_machine:~/.vscode-server
3) The actual remote environment: remote_machine:~/.vscode
In their case, which is similar if not the same as yours, VS Live Share was not installed in remote_machine:~/.vscode
Installing in that final location solved the issue.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With