SSH (OpenSSH) 10 · ~/.ssh/config

Define a host alias

Connect with ssh web instead of the long form.

Host web
    HostName example.com
    User deploy
    Port 2222
    IdentityFile ~/.ssh/id_ed25519
    IdentitiesOnly yes

Official SSH (OpenSSH) 10 documentation

More ~/.ssh/config commands

All ~/.ssh/config commands · SSH (OpenSSH) 10 cheatsheet

Was this page helpful?