[ILUG] ssh conundrum
Niall O Broin
niall at linux.ie
Sat Sep 18 13:08:01 IST 2004
I have numerous stanzas like this in ~/.ssh/config :
Host dale
HostName gateway.mydomain.com
Port 2204
HostKeyAlias dale
which makes for convenient use of ssh to access a bunch of machines
behind the gateway. However, the problem is that when I am connected to
the LAN behind the gateway this doesn't work (of course it's not
necessary, but it doesn't work which is the problem). Possible
solutions are:
1) Maintain 2 different copies of ~/.ssh/config, one without the Host
stanzas and one with
2) Write a wrapper script for ssh which figures out where I am and does
the necessary
I don't much like 1) as it necessitates manually switching between
them. 2) would be OK, and looks like the most likely option. But I'm
wondering is there a more elegant 3) which might be some extra nifty
use of ssh config options.
Niall
More information about the ILUG
mailing list