Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I'm root on a machine I don't know how it was configured.

I try to open SSHD on another port than 22 but it does not work.

I changed the /etc/ssh/sshd_config file and added a new Port line extra to the Port 22.

but it does only work when this second port is a number above 1024. Why is that? How can I find the reason?


I'm restarting it using /etc/init.d/sshd restart as root.

"netstat -apn" does not show the port is open by any other service (anyway I tried different ports and only above 1024 work).

"telnet localhost port" also shows the service works only when they are above 1024.

In iptables all tables are empty.


share|improve this question
You will find your answer here:… – zmode Oct 15 '12 at 15:08
Thanks, I know they are the privileged ports, but if I'm accessing as the root user I should then be allowed right? What else limits that? – Sitoplex Oct 16 '12 at 15:33

On UNIX and systems derived from it, Internet ports below 1024 are reserved for use by the root user. This means they are generally used by critical system services which themselves require root access to start up, if not during normal operation.

share|improve this answer
As I started the question "I'm root". Why cannot I open those ports if I am root? Is there any other limitation? or where can I find the self-imposed rules (besides in iptables which is empty)? Thanks! – Sitoplex Oct 16 '12 at 15:31
You didn't provide enough information to answer that question. Please provide (at minimum) your Linux distribution, OpenSSH version and any other relevant information. – Michael Hampton Oct 16 '12 at 15:36
Thanks for your help. Is there any general answer to that for any Linux machine? I don't know the system and I have repair a connectivity issue they have. I can run any command you want to find the information needed. I see it's a "CentOS release 6.2 (Final)". Also: ssh -v localhost OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010 – Sitoplex Oct 16 '12 at 15:47
@Sitoplex You're probably running into an SELinux denial. Check /var/log/audit/audit.log to confirm it. – Michael Hampton Dec 8 '13 at 22:45
It was very weird. I was root on that system but still unable to open ports below 1024. – Sitoplex Dec 10 '13 at 12:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .