(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)
> (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)
What I really want from a dynamic .ssh/config file is a way to specify conditional options.
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.
Holy crap, this needed to be in the SSH Kung Fu article. I wonder how to do a network test without slowing the ssh command down too much. At a certain point it becomes faster to type outsidednsname.voltagex.org than to wait for the match to execute.
Can you please remove your dependence on winrandom, and perhaps test it on python 3.4 + windows? Could not install winrandom on windows (2.7 only lib?).
9 comments
[ 4.4 ms ] story [ 34.2 ms ] threadSo 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:
[1] http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config