Configuring SSH
I was wondering what is the easiest and best way to specify what users will have access to ssh into a machine. I would like to give ssh access to only some users and not all.
Thanks in advance for you help, Xaviar |
You can set it in /etc/ssh/sshd_config or /etc/sshd_config
To use groups you could add the following lines: AllowGroups ssh DenyGroups * To use userpermissions you could try with: AllowUsers username1 name2 name3 DenyUsers * |
Thanks for you help!
|
Hi,
Quick and dirty: groupadd sshusers <= create new group chmod 750 /usr/bin/ssh <= remove world execute, owner and group only chgrp sshusers /usr/bin/ssh <= change group to sshusers Only users that are member of the sshusers group have acces to ssh (and root ofcourse). To make someone member of the sshusers group: usermod -G sshusers (read the manpage about the -G switch!!!!) You migth want/need to do this with the other ssh tools too. Hope this helps. |
Hi again,
I just noticed that you can read this questions 2 ways: 1) Allow/Disallow outside people onto your box (makuyl answered that one) 2) Allow/disallow local user to use ssh to go outside (my answer) |
All times are GMT -5. The time now is 11:56 AM. |