

A command line tool to manage your ssh config file - batuhanicoz
https://github.com/emre/storm?2014

======
JulianWasTaken
I've seen storm, it seems like it does way more than all I want, which is just
to make believe .ssh/config.d is a thing.

So I just do that:
[https://github.com/Julian/dotfiles/blob/master/.config/zsh/....](https://github.com/Julian/dotfiles/blob/master/.config/zsh/.zlogin#L5-18)

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)

~~~
GrinningFool
> (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?

------
coherentpony
I dunno, vim has always been the most useful command line tool to my manage my
ssh config file. Maybe that's just me though.

~~~
jarin
Same here, but I work with a couple of developers who fear the command line
(yes, I know) so this is still pretty useful.

------
INTPenis
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.

~~~
shabble
With relatively recent ssh versions you can use the Match directive[1] inside
your config file to do various conditional things.

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](http://www.openbsd.org/cgi-
bin/man.cgi?query=ssh_config)

~~~
voltagex_
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.

------
infocollector
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?).

