Say I want to configure my ssh options for 30 servers with the same setup in my .ssh config file:
host XXX
HostName XXX.YYY.com
User my_username
Compression yes
Ciphers arcfour,blowfish-cbc
Protocol 2
ControlMaster auto
ControlPath ~/.ssh/%r@%h:%p
IdentityFile ~/.ssh/YYY/id_rsa
where the only thing that changes between these 30 machines is XXX.
Instead than repeating the above structure 30 times in my config file, is there another way to define a range of machines?
%hfeature appeared in release 5.6 of OpenSSH. I was wondering why I hadn't seen it before - the version in Debian Squeeze is 5.5. – jw013 Jan 17 '13 at 20:09config, you can always just write a simple script that generates yourconfig. – Roger Dahl Nov 06 '15 at 01:01