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 and IPv4 forwarding no longer working
    ... I performed a recent upgrade and possibly openssh got upgraded as well. ... sshd is showing it is running. ... unabel to forward traffic nor does sshd answer port 22. ... Perhaps because you have the listenAddress set to 0.0.0.0? ...
    (Ubuntu)
  • F16 concurrency problem between network and sshd service
    ... I have a static network configuration using the network init script. ... I have a sshd configuration which defines various ListenAddresses ... ListenAddress 127.0.0.1:22 ... This time I was not able to connect to that machine via IPv6. ...
    (Fedora)