sshd -p option vs ListenAddress
Chris Lightfoot
chris at ex-parrot.com
Wed Dec 14 23:48:49 EST 2005
On Wed, Dec 14, 2005 at 01:36:33PM +0100, Peter Stuge wrote:
> On Tue, Dec 13, 2005 at 06:49:33PM +0000, Chris Lightfoot wrote:
> > If all ListenAddress lines in the sshd_config file specify
> > a port, then the -p option to sshd is silently ignored:
> >
> > # cat test_sshd_config2
> > ListenAddress 0.0.0.0:22
> > ListenAddress 0.0.0.0:2222
> > # `pwd`/sshd -D -d -p 4411 -f test_sshd_config2
> [..]
> > debug1: Bind to port 2222 on 0.0.0.0.
> > debug1: Bind to port 22 on 0.0.0.0.
> > Bind to port 22 on 0.0.0.0 failed: Address already in use.
> > Cannot bind any address.
> > # ^D
> >
> > This seems... counterintuitive, at least. Is it the
> > intended behaviour?
>
> Two different options (Port and ListenAddress) that control the same
> thing are bound to be at least a little bit confusing.
>
> Although sshd_config(5) is somewhat helpful, it doesn't clearly say
> that ListenAddress has priority over Port, at least with a
> ListenAddress on host 0.
No -- it's in the case where all ListenAddress directives
specify a port, rather than where all specify host = 0.
--
If we couldn't laugh at things that didn't make sense,
we couldn't react to a lot of the world around us. (Calvin and Hobbes)
More information about the openssh-unix-dev
mailing list