Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Allow SSH only on one of a servers IP addresses

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,

share|improve this question

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

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

marked as duplicate by Jeff Ferland, EEAA, John Gardeniers, mulaz, Ward Oct 29 '12 at 13:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
I don't really think this is a duplicate. The other one is a little bit different question. –  Rudy Matela Aug 12 '13 at 20:47

1 Answer 1

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.

share|improve this answer