2025-05-07.15-51-36.mp4
This is a tool to make SSH connections easier with VSCode. When you run the c command in a remote SSH environment, the VSCode (or Cursor, etc.) connection command is automatically copied to your clipboard. This makes connecting from your local machine to the remote environment simple.
- VSCode (or a VSCode fork) installed on your local machine
- Path to the
codecommand (orcursor, etc.) is properly set - Remote SSH plugin is installed
- SSH connection to a remote server is available
- Properly configured
~/.ssh/configfile on your local machine to establish the SSH connection
- Properly configured
Connect to your remote server via SSH and run the following commands:
git clone https://github.com/yi7242/EasyRemoteSSH.git
cd EasyRemoteSSHEdit the configuration file to match your environment:
# Open the config file
nano config.sh
# Change the following variables
remote_host="" # Host name in .ssh/config
editor="code" # Local editor command (code, cursor, etc.)Add the script to your PATH using one of these methods:
export PATH=$PATH:$(pwd)echo 'export PATH=$PATH:'"$(pwd)" >> ~/.bashrc
source ~/.bashrcTo open the current directory on the remote server:
user@userserver:~/project$ c
code --remote ssh-remote+userserver /home/user/project
Copied to Clipboard!The displayed command is copied to your clipboard, so you only need to paste and execute it on your local machine.
To specify a different directory:
user@userserver:~/project$ c ../
code --remote ssh-remote+userserver /home/user
Copied to Clipboard!