Re: Multihomed Configuration



On Thu, Jun 07, 2007 at 12:06:12PM -0500, Dallas Clement wrote:
On Wed, 2007-06-06 at 22:32 +0530, Nirmal Babu Puliyadi Suriya Kumar -X
(npuliyad - HCL at Cisco) wrote:

But, Is it possible to assign/ configure different default directory for
each IP address with same login username?

I'd run two separate instances of sshd, one for each interface whose
behavior you want to be unique. Give each one a separate config file,
which does whatever it is you need to do.

You could even run one of them inside a chroot, if that is the easiest
way to do whatever it is you want.

e69001# grep "ListenAddress" sshd_config
#ListenAddress 0.0.0.0
#ListenAddress ::
ListenAddress 172.23.87.109
ListenAddress 192.168.2.133

(You don't want to listen on loopback?!)

It's a shame to have to hard-configure both IP addresses in this config
file -- especially if you are getting them dynamically through DHCP. I
wonder if there is a different way to enable sshd on both NICs without
specifying the IP address...

If he simply went back to

ListenAddress 0.0.0.0
ListenAddress ::

then it would listen on all the machine's interfaces. That is the default.
Heck, he could even remove all the ListenAddress lines entirely, because
these *are* default settings.



Relevant Pages

  • RE: server from outside via a key
    ... One possible way is to run two instances of sshd. ... In sshd will listen on the public interface ie set ListenAddress in ... authentication) and the other sshd listening on your private interface. ... server from outside via a key ...
    (SSH)
  • Re: ssh client gets to server, but doesnt connect...?
    ... I can see the SSH traffic hitting the eth0 ... interface. ... Port 22 ... ListenAddress 192.168.0.2 ...
    (comp.os.linux.networking)
  • Re: ssh client gets to server, but doesnt connect...?
    ... I can see the SSH traffic hitting the eth0 ... interface. ... Port 22 ... ListenAddress 192.168.0.2 ...
    (comp.os.linux.networking)
  • Re: sshd multiple IPs multiple ports
    ... > 5.3 box that i've got unique requirements for sshd on. ... > nics, one external one internal. ... > on port 22 and to allow all user's in. ... You do the different ports with multiple ListenAddress lines in ...
    (comp.unix.bsd.freebsd.misc)
  • Re: openssh with DSL and DHCP -- ListenAddress?
    ... > I am trying to get sshd running on my linux box. ... > internet through an ethernet card connected to DSL using DHCP on my ISP. ... > After running sshd, I am unable to connect from other hosts. ... > I think that the problem is with the ListenAddress Parameter in the ...
    (SSH)