Using vsc-ssh-opener
, you can code .
in SSH!
-
Build server binary in Local
Clone this repository and run as follows to build the server binary at root of the repository:
$ cargo build --release
-
Set up the config file in Local
Here is the path to the config file:
- in Linux
/home/your-user/.config/code-open-server/table.json
- in Windows
C:\Users\your-user\AppData\Roaming\code-open-server\table.json
Write the mapping from the hostname to name in
.ssh/config
totable.json
. For example:{ "hostname": "ssh-host" }
- in Linux
-
Run
code-open-server
in LocalRun the following in the repository root:
$ ./target/release/code-open-server
-
SSH with port forwarding
$ ssh -R 3000:localhost:3000 ssh-host
-
Build and Install client binary in Remote
$ cargo install --git https://github.com/alphaKAI/vsc_ssh_opener code-open
Now, you can open the local VSCode by running the following somewhere remotely!:
$ code-open .