3 ms·
Didn't work for me because I use a separate key for each "class" of machines, where class is github, bitbucket, work, home, ... You can reduce the maintenance
by emmelaich 11y ago
Didn't work for me because I use a separate key for each "class" of machines, where class is github, bitbucket, work, home, ...
You can reduce the maintenance load by using the %h (remote hostname) and %r (remote username) substitutions in IdentityFile. I make a symlink from the key I want to
e.g. id-rsa-<remoteuser>@<remotehostname>.key and use IdentitiesOnly.
See 'man ssh_config'
Use %u (local user) and %l (local hostname) for extra control.
It doesn't have %p (port) but the Host parameter in future versions of openssh will let you match on that too.