Add user to SSH group safe?
7,212
The purpose of ssh
group was described on Unix. There is no gain by adding user to ssh
group, because the group is used only for pre-authentication process.
If you want to use a group to limit who can log in to your server using ssh
, create a group sshuser
, add AllowGroups sshuser
to your /etc/ssh/sshd_config
and restart your ssh
service.
Related videos on Youtube
Author by
user72718271
Updated on September 18, 2022Comments
-
user72718271 almost 2 years
I want to control who can log in via SSH on my server. Is it safe to add the group 'ssh' to the users who are allowed to login in?
I see some distros use system groups in the user's ID and others recommend creating new groups. For example, some users will have the
sudo
group and other distros recommend creating a new groupgSudo
and adding it to the sudoers file.-
Admin over 8 yearsI am not sure off hand what the ssh group is for.. but it's not for that. So I suppose if you want to create a group, you should create a new user group. But you could also add individual users instead. So, you can set ssh up as a whitelist i.e. to not allow anybody except, those users or groups.
-