notexcitex

An ssh config that stays readable

21 August 2026

Most of my ssh config mess came from copying snippets without any structure. Specific hosts go first and defaults last, because ssh uses the first value it finds.

Host build
    HostName 192.0.2.10
    User deploy
    IdentityFile ~/.ssh/build_ed25519
    IdentitiesOnly yes

Host *
    ServerAliveInterval 30
    AddKeysToAgent yes

IdentitiesOnly yes stops the client from offering every key in the agent, which avoids the too many authentication failures error on strict servers.