Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Well, I need use multiple and distinct ports where sshd will be listening, for distincts clients. Each client connect a different ssh port in real time.

Can I put sshd service listening on multiple ports? Something like a port range in sshd config file ?

Thanks in advance.

share|improve this question

migrated from May 20 '13 at 12:34

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

up vote 4 down vote accepted

See man-page of sshd-config:

ListenAddress Specifies the local addresses sshd(8) should listen on. The fol- lowing forms may be used:

ListenAddress host|IPv4_addr|IPv6_addr
ListenAddress host|IPv4_addr:port
ListenAddress [host|IPv6_addr]:port

If port is not specified, sshd will listen on the address and all
prior Port options specified.  The default is to listen on all
local addresses.  **Multiple ListenAddress options are permitted.**
Additionally, any Port options must precede this option for non-
port qualified addresses.



Specifies the port number that sshd(8) listens on. The default is 22. Multiple options of this type are permitted. See also ListenAddress.

share|improve this answer
But, you should note that by default maximum number of listening ports for sshd is 256. – Nickolay Olshevsky May 20 '13 at 9:33
so, but can I use Port 22 Port 25980 Port 25981 Port 25982 , etc. I need not qualified address only. There is no limits in ports number? – ManuParra May 20 '13 at 9:39
See my edit, you can define multiple Port entries. – j.holetzeck May 20 '13 at 9:43
256 ports are more than enough – ManuParra May 20 '13 at 10:52
You can have more than 256 by starting a separate instance of sshd, with it's own config file and ports-list. – Don Simon May 20 '13 at 14:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.