sshc: a simple command-line SSH manager

, ,

I usually have to SSH into a lot of servers; personal servers and work-related. Remembering their hostnames or IPs has always been a task. I have tried a few apps like Termius, but they often come with their own set of drawbacks. Many of these solutions are paid, which can be a significant investment if you’re just looking for a simple way to manage your connections. Furthermore, they often require extensive setup and configuration, which can be time-consuming when you just want to quickly connect to your servers.

What I really needed was a lightweight, free solution that I could set up quickly and start using right away. I wanted something that would help me organize my SSH connections without the overhead of a full-featured (and often overpriced) application.

That’s why I decided to create my own solution: a simple npm package that addresses these exact pain points. My goal was to develop a tool that’s easy to install, requires minimal setup, and gets you connected to your servers with minimal fuss.

In this post, I’ll introduce you to this package and show you how it can simplify your SSH workflow without breaking the bank or requiring a considerable effort to set up.

Installing simple-sshc

Installing simple-sshc requires node version 14.0.0 or above to work. If you have not already, you can install node and npm here.

Once you have node and npm setup, run this command to install simple-sshc globally:

$ npm install -g simple-sshc

You can verify the installation using:

$ sshc version                                                  
sshc version 1.0.1

Connecting to a server

You can SSH into your saved hosts by simply invoking the sshc command:

Features

Adding connections

Easily add new SSH connections to your list with a simple interactive prompt:

$ sshc add
Enter the label: myserver 
Username: user
Hostname (IP address): 192.168.1.100

The CLI guides you through the process, ensuring you don’t miss any crucial details. Once added, your connection is saved and ready for quick access.

List all connections

View all your saved connections at a glance:

$ sshc list

Modify existing connections

Need to update a connection? You can use sshc modify to do that.

$ sshc modify
? Select the connection to modify: myserver
? New username: newuser
? New hostname (IP address): 192.168.1.101

Remove connections

Cleaning up is just as easy:

$ sshc remove 
? Select the connection you wish to remove: oldserver 
? Are you sure you want to remove this connection? Yes

GitHub

You can download the source code from GitHub: https://github.com/danish17/sshc/

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *