Skip to content

yi7242/EasyRemoteSSH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EasyRemoteSSH

日本語README

2025-05-07.15-51-36.mp4

Overview

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.

Prerequisites

  • VSCode (or a VSCode fork) installed on your local machine
  • Path to the code command (or cursor, etc.) is properly set
  • Remote SSH plugin is installed
  • SSH connection to a remote server is available
    • Properly configured ~/.ssh/config file on your local machine to establish the SSH connection

Setup Instructions

1. Clone the Repository

Connect to your remote server via SSH and run the following commands:

git clone https://github.com/yi7242/EasyRemoteSSH.git
cd EasyRemoteSSH

2. Configure Variables

Edit 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.)

3. Add to PATH

Add the script to your PATH using one of these methods:

Temporary Use

export PATH=$PATH:$(pwd)

Permanent Use

echo 'export PATH=$PATH:'"$(pwd)" >> ~/.bashrc
source ~/.bashrc

Usage

Basic Usage

To 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.

Specifying Another Directory

To specify a different directory:

user@userserver:~/project$ c ../
code --remote ssh-remote+userserver /home/user
Copied to Clipboard!

About

Make SSH connections easier with VSCode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages