A command line tool to manage your ssh config file
github.com
github.com
So I just do that: https://github.com/Julian/dotfiles/blob/master/.config/zsh/....
And then just go on editing files.
(What I really want, which is another story, is a terser way to use knife ssh with queries, so that I can ssh around by service name and environment, but I haven't gotten a chance to write this in a fast enough form)
Curious how that would look?
For example, today my .ssh/config is a symlink to either .ssh/config-home or .ssh/config-out on my laptop. If I'm out I use the config-out file but if I'm on my home VPN or at home I use config-home.
Also I have a ProxyCommand for many work servers so I proxy through my work laptop that is always on and this command is not needed if I'm in my work network.
So in two ways the only thing I ever needed from a dynamic ssh configuration is conditional options based on my network location. Today I change this manually with a script and symlinks, but have to maintain two different configurations.
Edit: I just realized while typing this that one solution would be to use a jinja2 template for my ssh_config instead of maintaining two different files.
Then you could do something like this:
Host foo
Hostname foo.example.com
Match exec 'at_home_test.sh'
Hostname vpn-gw.example.com
Proxycommand ...
[1] http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config