On Mon, Sep 22, 2014 at 11:19:53AM +0100, Laurie Brown wrote:
On 22/09/14 08:52, Chris Green wrote:
[SNIP]
On Sun, Sep 21, 2014 at 11:25:23PM +0100, steve-ALUG@hst.me.uk wrote:
[SNIP]
If I wasn't using ProxyCommand I think your solution would work, I
[SNIP]
I don't really see why you think that ProxyCommand affects this, but IMO the solution for your original question is dnsmasq.
Because if I do 'ssh chris' when I'm on the LAN it finds the ProxyCommand as follows:-
Host chris ProxyCommand ssh cheddar nc -q0 zbmc.eu 22
... and will connect out from the LAN to cheddar on the internet and then back again to my desktop machuine. I *do* have dnsmasq at home on the LAN.
The whole point of the ~/.ssh/config file I have is that when I'm not at home I can just enter 'ssh chris' and I will be automatically connected via cheddar.halon.org.uk to my home machine 'chris.zbmc.eu'.
However this *prevents* 'ssh chris' doing the obvious default thing it would normally do when I'm at home connected to the LAN. Instead of just connecting me to 'chris' (which it can find because I have dnsmasq running) it instead connects out to cheddar.halon.org.uk and then back to zbmc.eu, as directed by the ProxyCommand.