On Mon, Apr 30, 2012 at 9:58 AM, Mike Miller <mbmiller+l at gmail.com> wrote:

> On Mon, 30 Apr 2012, Erik Anderson wrote:
>
>  On Mon, Apr 30, 2012 at 1:51 AM, Mike Miller <mbmiller+l at gmail.com>
>> wrote:
>>
>>  I also like the sudo idea, but I see one shortcoming -- most people use
>>> their own password to gain root permissions via sudo, but that means if
>>> someone gets their password, they can access not just their data, but they
>>> can completely own the system.  It seems like it would be safer to use one
>>> password to login and a different password for sudo.  I assume that can be
>>> done, but I haven't done it, and I'm not sure of how to do it.
>>>
>>
>> Well, this applies mostly to connecting to a host via ssh, but you turn
>> off PasswordAuthentication and authenticate instead with a keypair, where
>> the private key is encrypted with a different passphrase than then one that
>> is hashed in the remote system's /etc/shadow.
>>
>> I find it quite funny that so many people grouse (I'm speaking generally
>> here, not trying to infer that you have anything against this) about
>> turning off PasswordAuthentication when in reality, PKA is far easier to
>> use and is far more secure once it's set up. Yes, there are a few steps one
>> has to go through and a few incantations to say to get the keys generated,
>> get 'em in the right place, and ensure that ownership/permissions are set
>> correctly, but once that's done, Bob's yer uncle.
>>
>
> I don't fully understand this, but I think it is a valuable idea that I
> should know more about.  It's one of those things that I've been wanting to
> get into for years but haven't gotten around to, yet.
>
> One question:  If I have several Linux servers that I regularly log into
> via ssh, almost always from other Linux servers, if I use PKA to log into
> these machines, doesn't that mean that if someone manages to get into one
> machine, he'll be immediately able to get into all of them?  And would he
> also be able to acces enough information to connect again from other
> locations?
>

Yes. Maybe.  It depends if your keys have passwords or not, if they have
the same password, and if you have ssh-agent running, or auto-initiated.

At the end of the day, if someone gets a shell/desktop session as you,
security is only as good as it works against yourself.  Any concessions to
convenience you've made are now working against you.


> I get your idea -- anyone connecting using the keys wouldn't be able to
> use sudo unless he knew the sudo password.  That's good, but can't that
> also be accomplished by having a sudo password that is different from the
> user password?  (Which is what I was asking about above.)  I have a
> different user password on every machine I log into, and I could easily
> also have a different sudo password, too.


I've never seen the sudo password different from the user's system
password.  I did some google searches and saw one mechanism for doing it,
which I found interesting.  Are you directing sudo to target another user
to facillitate authentications?  Doesn't that mean everyone using sudo on
the system is using the same account for authentication?  I'm curious to
know more about what you're doing here.

-Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20120430/300353e7/attachment.html>