Configuration dependent on local hostname?

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

 



Hello,

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

  Host         ext-gw.my-do.main
  ProxyCommand none
  
  Host         *.my-do.main
  ProxyCommand ssh ext-gw.my-do.main nc -w1 %h 22

This works fine while being outside of the NATted network.

Now I would like to configure a laptop in such a way that it is able
to connect directly to the network as well as from the outside.  For
that, I'd like to do something like that:

  
  Host         gw.my.do.main
  ProxyCommand none
  
  LocalHost    ! *.my.do.main
  Host         *.my.do.main
  ProxyCommand ssh gw.my.do.main nc -w1 %h 22
  LocalHost    *


Of course, such a "LocalHost" option does not exist.  Maybe there exist
some other way to do this?

BTW: I am using openssh as it comes with opensuse11.1 and ubuntu-8.10

     opensus-11.1 $ ssh -V
     OpenSSH_5.1p1, OpenSSL 0.9.8h 28 May 2008
    
     ubuntu-8.10 $ ssh -V
     OpenSSH_5.1p1 Debian-3ubuntu1, OpenSSL 0.9.8g 19 Oct 2007

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

  Powered by Linux