[nylug-talk] sudo vs 'ssh as root'
David Rosenstrauch
darose at darose.net
Mon Jul 9 12:06:09 EDT 2007
Michael Bubb wrote:
> Hello
>
>
> I remember a few years back reading an interesting security discussion
> on sudo vs sshing as root into servers.
>
> My company's current policy is to ssh in as root. I don't believe that
> is the best way (ie most secure way) but I do not remember the
> details. I seem to remember that sshing in as a regular user and then
> elevating privileges. It is also easier to track mistakes this way.
>
> This is, I realize, a fairly basic security question (which I am
> cross-posting to SAGE). I have heard people who angrily declaim
> sudo... but I have never gone through the process of figuring this out
> for myself.
>
> Any ideas? Good stuff to read on this?
>
> Many thanks as always
>
> Michael Bubb
I don't have any specific pointers on this (though I imagine it's not
hard to dig some up), but it's kind of common sense, actually:
Do you really want it to be possible for someone to log in as root onto
a box sitting out on the Net? Crackers are constantly trying to use
brute force attacks to crack boxes, and by allowing that you're just
inviting trouble.
As you surmised, disabling remote root access, and then requiring
sudo/su to elevate privileges is a much safer approach.
If you really needed to allow direct logins as root (and again I don't
recommend it) then at least configure the root account so that you can
only log in using a crypto key, and not passwords.
DR
More information about the nylug-talk
mailing list