sshcode
is a CLI to automatically install and run code-server over SSH.
It uploads your extensions and settings automatically, so you can seamlessly use remote servers as VS Code hosts.
If you have Chrome installed, it opens the browser in app mode. That means there's no keybind conflicts, address bar, or indication that you're coding within a browser. It feels just like native VS Code.
Chrome is recommended.
Install with go
:
go get go.coder.com/sshcode
Or, grab a pre-built binary.
sshcode kyle@dev.kwc.io
# Starts code-server on dev.kwc.io and opens in a new browser window.
You can specify a remote directory as the second argument:
sshcode kyle@dev.kwc.io ~/projects/sourcegraph
By default, sshcode
will rsync
your local VS Code settings and extensions
to the remote server every time you connect.
This operation may take a while on a slow connections, but will be fast on follow-up connections to the same server.
To disable this feature entirely, pass the --skipsync
flag.
By default, VS Code changes on the remote server won't be synced back
when the connection closes. To synchronize back to local when the connection ends,
pass the -b
flag.