Re: Configuration dependent on local hostname?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 24, 2009 at 02:40:52PM +1100, Darren Tucker wrote:

>> To get access to hosts behind a NAT-router, I have put the following
>> into my ssh-config:

[ ... ]

> You can do this entirely with a little proxycommand.  For example, I have 
> something like this:
>
> in ~/.ssh/config:
>
> Host myinternalhost
>   ProxyCommand ~/bin/myconnect %h %p
>
> in ~/bin/myconnect:
>
> #!/bin/sh
> if ifconfig fxp0 | grep "inet 10\.0\.0\." >/dev/null; then
> 	exec nc $1 $2 # internal, connect direct
> fi
> exec gw.my.do.main ssh nc $1 $2 # external, via GW

[ ... ]

Ah, that looks very promising.  Thanks Darren!  I'll try that.

[Index of Archives]     [Open SSH Unix Development]     [Fedora Users]     [Fedora Desktop]     [Yosemite Backpacking]     [KDE Users]     [Gnome Users]

  Powered by Linux