Server Fault is a question and answer site for system and network administrators. 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 have a live IP forwarding port 52000 on my RHEL 6.2 server.

My server listens to 22 and 52000 for traffic. The setup is working fine. Users from internet are able to login into the system.

But I want to restrict that only "admin" users should be able to login via 52000 port. root or other users should not be able to login into the system.

All other users should be able to login via port 22.

What are my possible options?

share|improve this question
up vote 2 down vote accepted

You can start two sshd processes listening on the two different ports. Modifying the sshd config file for the one listening on port 52000 add the following:

# Listen on port 52000
Port 52000

# Only allow users that are part of the sshadminusers group
AllowGroups sshadminusers

Create the group on on your server and add the relevant admin users to that group.

groupadd –r sshadminusers

usermod –a –G sshadminusers username
share|improve this answer
That's a workable solutions, Thanks! If I do not get any better answer, I will implement your solution and accept your answer. – user1263746 Oct 22 '13 at 5:52

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.