I can currently login to my server via ssh as root. There may be some other users, however, that have ssh access. I want to block out any possible logins except from root. How can I do this?
Thanks.
|
|
|
So you can achieve your stated desire with the AllowUsers directive in your sshd_config file, for example:
However I would be wary of using the root account for ssh - consider instead an unprivileged account for normal use, using something like sudo to acquire root privileges only when needed. |
|||
|
|
|
From man sshd_config
Btw. please don't allow passwords login for your root user. Only allow ssh keys or even better just allow a specific user to login and change to root but not root directly. |
|||||||
|