[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: blocking ssh Root Logins



Martin McCormick wrote:
	Is there a way to configure either sshd or the login
configuration files to totally prevent root logins so that one must
log in as themselves and su - to root?

	I know of one Debian system and one Redhat system that I would
feel a lot better about if one could log in only as one of the users
and then su to root.  Thank you.


Add 'PermitRootLogin no' to /etc/ssh/sshd_config and restart ssh.
As a caveat, make user to include the AllowUsers directive with at
least one user that should *always* be able to log in remotely.
In the event you mess up your other settings for ssh (short of
firewalling off the port or bringing down your ethernet interfaces)
that user can always log in to fix things.

-Roberto

--
Roberto C. Sanchez
http://familiasanchez.net/~sanchezr

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: