SSH, my way
I use SSH every working day. Over time, I have found many practical uses for it and gathered a few tips worth sharing.
There are a few things about SSH that only become apparent after going around in circles a few times, and rarely used commands and options can easily slip from memory. Taking notes is a great idea, but turning those notes into configuration that works instantly is even better.
I intend to write short notes on the different aspects of SSH configuration that are worth knowing and maintain an index of those notes here.
Long SSH commands are easy to mistype and hard to remember. Even with command completion, you still need to remember what you are looking for.
~/.ssh/config lets you set global options, name hosts, and more. Once you start using it, you may never stop.
This matters because SSH is not used by just one tool. If you use scp or rsync, they will use your config. Even a polished frontend such as ForkLift will usually rely on SSH underneath, putting your SSH config at its disposal.
My usual pattern
I prefer explicit host blocks with names that describe the role, not just the hostname. I keep user names, ports, identity files, and jump hosts in the config so commands stay small.
The payoff is not cleverness. It is reduced friction. If the right connection is easy to type, you are less likely to invent a risky shortcut when something urgent is happening.
Collection of notes about SSH
- How and why to reuse SSH connectionsWhy use multiple SSH sessions over a single connection? Reusing connections speeds up new sessions, simplifies authentication, and can help when networks are under strain.