Ssh Client Config Tips

This post concat some tips I learned along the way about the SSH which makes me more productive. Put generic Host config at the end The config file is read sequentially, and the first rule that matched will be taken into account. If you put your Host * 1 at the top of your ~/.ssh/config then further rules won’t be applied. Host foo Username bar Hostname foo.baz # this rule will apply to all connection. and appened to the "toto" host definition. Host * AddKeysToAgent yes IdentityFile ~/.ssh/ed25519 Split your config files By default, ssh client, will read his config from /etc/ssh/ssh_config and ~/.ssh/config. The the later one, I like to add this line of config: ...

December 8, 2021 · 2 min · 395 words · Rémi Desgrange