Take the 2-minute tour ×

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

1 Answer 1

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


