can any one tell me how to block a particular users ssh login.But when he logs in locally it should happen. thank you
If the user has a static IP address, you can add Code: sshd: 12.34.56.78 to /etc/hosts.deny. Replace 12.34.56.78 with the user's static IP address.
Blocking, Allowing users for SSH vim /etc/ssh/sshd_config # To allow only certain users >> Allows only user1 and user2 to login via SSH AllowUsers user1 user2 user3 # To block certain users >> Blocks only user5 and user6 DenyUsers user5 user6
You can use allowed group as well, that way you just add users to the group. Code: AllowGroups <group_name>