sshd -p option vs ListenAddress

Chris Lightfoot chris at ex-parrot.com
Thu Dec 15 10:04:11 EST 2005


OK, if you want a quote from the man page (sshd(8))

     -p port
             Specifies the port on which the server listens for connections
             (default 22).  Multiple port options are permitted.  Ports speci­
             fied in the configuration file are ignored when a command-line
             port is specified.

but, as stated, this is not true in the case where every
ListenAddress line in the configuration file specifies a
port.

> Note that -p don't replace any "already-defined Port" !

?

sshd.c:981:
                case 'p':
                        options.ports_from_cmdline = 1;

servconf.c:465:
        case sPort:
                /* ignore ports from configfile if cmdline specifies ports */
                if (options->ports_from_cmdline)
                        return 0;


-- 
``The English people are like the English beer--
  froth on top, dregs at the bottom; the middle, excellent.'' (Voltaire)




More information about the openssh-unix-dev mailing list