Getting More Out of Your SSH Config File

SSH’s per-user config file (~/.ssh/config) eliminates an enormous amount of repetitive typing and remembering — genuinely underused by developers who type full ssh user@host -p port -i keyfile commands every single time.

Host prod-web
    HostName 203.0.113.10
    User deploy
    Port 2222
    IdentityFile ~/.ssh/prod_key

Host staging
    HostName 203.0.113.20
    User deploy
    IdentityFile ~/.ssh/staging_key
    ProxyJump prod-web       # tunnel through prod-web to reach staging

Host *
    ServerAliveInterval 60   # keeps connections alive through NAT/firewall timeouts
    AddKeysToAgent yes
# Instead of: ssh -p 2222 -i ~/.ssh/prod_key deploy@203.0.113.10
ssh prod-web

ProxyJump: A Genuine Time-Saver

ProxyJump automatically tunnels through a bastion/jump host to reach a server that isn’t directly internet-accessible — replacing a manual two-step SSH-then-SSH-again process (or a clunky -J flag typed every time) with a single, memorable host alias.