I have a bunch of hosts that I set aliases for in my ~/.ssh/config
. They are all part of a certain domain that has certain settings:
Host apple
GSSAPIAuthentication yes
GssapiDelegateCredentials yes
HostName apple-computer.example.com
User guyincognito
Host *.example.com
GSSAPIAuthentication yes
PreferredAuthentications gssapi-with-mic
GssapiDelegateCredentials yes
User guyincognito
What I'd like to do is to just define the aliases, and then have ssh recognize that they point to example.com, and read the block with the domain settings. So like:
Host banana
HostName banana-computer.example.com
# Uses GSSAPIAuthentication, user name, etc. from *.example.com !
Host cherry
HostName cherry-computer.example.com
Is there any way to avoid repeating all the settings for each alias? I would not like to put the settings in the global scope, as I also have to connect to servers that do not like GSSAPIAuthentication for example.