Hi,
How to disable direct ssh login for particular user.
for example. I have two user access, one of it should allow me to connect ssh user1@a.b.c.d and for other user i can simply su - user2.
It should not allow to me ssh user2@a.b.c.d
ssh direct login restriction
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: ssh direct login restriction
You can edit '/etc/ssh/sshd_config' and use any of the following examples:
In order to verify your new configuration run one of the following:
After that you can just restart/reload your sshd
Code: Select all
AllowUsers user1 user2
DenyUsers user1 user2 user3
DenyGroups group1 group2
Code: Select all
sshd -t
sshd -T