2

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?

1 Answer 1

2

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
1
  • That's a workable solutions, Thanks! If I do not get any better answer, I will implement your solution and accept your answer. Oct 22, 2013 at 5:52

You must log in to answer this question.

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