Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Sep 2014 00:00:38 -0400
From:      Daniel Staal <DStaal@usa.net>
To:        John Case <case@SDF.ORG>, freebsd-questions@freebsd.org
Subject:   Re: comparing SSH key and passphrase auth vs. an SSH key *with* a passphrase ...
Message-ID:  <E79B9D9533E6F405B49EA064@[192.168.1.50]>
In-Reply-To: <Pine.NEB.4.64.1409151907380.5595@faeroes.freeshell.org>
References:  <Pine.NEB.4.64.1409112200270.27915@faeroes.freeshell.org> <08D7B04D-CBBF-4330-BAD6-2668F9560964@mac.com> <Pine.NEB.4.64.1409151907380.5595@faeroes.freeshell.org>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
--As of September 15, 2014 7:09:46 PM +0000, John Case is alleged to have 
said:

>> Key based auth is definitely the better choice out of those two.
>
>
> Ok, agreed.
>
> However, just out of curiousity - let's pretend that sshd *did* allow you
> to use both an SSH key and a UNIX password at the same time ... would
> that be more or less secure than using an SSH key with a built-in
> passphrase ?

--As for the rest, it is mine.

Lots of variables there: How does sshd store the password?  (Does it use 
the system's user password?  How are you storing that?)  Can you *require* 
using a password with a SSH key?  How does the SSH key store the password? 
etc.

On a basic level, at that point you need both something you have (the SSH 
key) and something you know (the password).  The two pieces are the same in 
both cases, so the security comes down to implementations - and since one 
isn't implemented, we can't compare implementations.  ;)  Chuck mentioned 
that the storage for passwords with private keys isn't super great, so if 
it used the system's user password that should be better - because there's 
been a lot of work on storing those securely.

BTW: Since a couple of people have pointed to Google's two-factor system, I 
thought I'd point to my current favorite: Yubikey[1].  There's a PAM 
module, so it can be set up moderately easily.  (I'll admit I haven't 
tried: I mostly rely on physical security for my main network...)

Daniel T. Staal

[1]: <http://www.yubico.com/>;

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?E79B9D9533E6F405B49EA064>