erik-odiin-jbQvJx2EWnU-unsplash

Managing SSH Connections via Terminal

When working as an Administrator, you somtimes have to log into many different SSH sessions. As a fan of the terminal, You will usuallly write something like

$ ssh long-alphanumeric-username@cryptic-server-name.com

Scrolling through history or writing scripts is quite inefficient. Yes: there is a config file for ssh, but still you have to remember the given name of the connection, think about a naming scheme, etc.

So I decided to code a small tool that manages my connections:

scm

You can see all your connections on a single screen. Selecting a connection works by

  • Navigating with your cursor (Up/down) and press ENTER
  • Press the according key in order to instantly open the connection
  • Selecting a connection with your mouse (if the termnal supports mice)
  • Jump to a connection by typing it’s number

I’m planning to add a connection editor, until then, you simply edit the ~/.scm.yaml file like so:

connections:
  - title: "DigitalOcean"
    server: "mydroplet.example.net"
    username: root
	port: 4022
    shortcut: d
  - title: "Home Server"
    server: "192.168.1.5"
    username: john
    shortcut: k

Feel free to download and try the program at https://github.com/gollenia/scm