I have two IP addresses, IP1 and IP2. Currently I have set sshd to listen on port 22 and port 443. The problem is that it listens on both these ports on both IP addresses. Is it possible to listen just on port 22 on IP1 and listen on both port 22 and 443 on IP2? If so, how?

I am running Ubuntu 10.04 server.

Thanks,

link|improve this question
feedback

migrated from stackoverflow.com Oct 6 '10 at 0:20

This question came from our site for professional and enthusiast programmers.

1 Answer

Yes:

ListenAddress ip.the.first:22
ListenAddress ip.the.second:22
ListenAddress ip.the.second:443

Those ListenAddress directives are in your sshd_config file. It does accept IP:Port nomenclature to specify exactly where to listen. if you do this, you won't need the Ports directive.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown