21 ms·
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 li
by shabble 12y ago
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
- mnem 12y agoI had no idea that existed, thanks! Time to rewrite my configs...
- voltagex_ 12y agoHoly 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.