SSH, Actually 100% signal, 0% noise.

SSH Config Basics

concept
depth 2/3 − deeper + surface

~/.ssh/config is a named set of connection instructions—not a routing table for hostnames. Each block gives a nickname to a full set of connection details, so ssh myserver replaces a command line full of flags.

The basic structure:

Host nickname
    HostName actual-server.com
    User remote-username
    Port 2222
    IdentityFile ~/.ssh/specific_key
    IdentitiesOnly yes

The fields:

  • Host—what you type: ssh nickname
  • HostName—real address (DNS or IP)
  • User—remote username (defaults to your local username)
  • Port—SSH port (defaults to 22)
  • IdentityFile—which key to use
  • IdentitiesOnly yes—only try the specified keys

The before/after is the whole sales pitch. Without config:

ssh -i ~/.ssh/id_work_yk -p 2222 [email protected]

With config: ssh work. Short memorable names, the correct key always used, port and username remembered—and git operations against configured hosts just work.