Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

Infos:

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.

Thanks!

share|improve this question
    
You will find your answer here: unix.stackexchange.com/questions/16564/… –  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

1 Answer 1

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
1  
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
1  
@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

Your Answer

 
discard

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.