.ssh/config file

The .ssh/config file allows to configure ssh aliases in quite an elegant way. Makes obsolete the need to remember full ssh server address, port, user or possibly different authentication file you'd need to pass.

.ssh/config file has lots of options, but for me, for now the most important are

Host some_server
    HostName some.server.example.com
    IdentityFile ~/.ssh/some.key
    User webmaster

Meaning, that if I run ssh some_server in reality i'll issue ssh -i ~/.ssh/some.key webmaster@some.server.example.com -i.

For all configuration options read official manpages . But these two posts were most helpful for me: Simplify Your Life With an SSH Config File and Uses for ~/.ssh/config

Comments

Comments powered by Disqus