l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2005 Jul 25 11:31

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] sshd_config and PasswordAuthentication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] sshd_config and PasswordAuthentication

on Fri, Jul 22, 2005 at 03:04:46PM -0700, Micah J. Cowan (micah@cowan.name) wrote:
> On Fri, Jul 22, 2005 at 12:02:41PM -0700, Karsten M. Self wrote:
> > on Fri, Jul 22, 2005 at 10:01:32AM -0500, Jay Strauss (me@heyjay.com) wrote:

> > > I think you are talking about passwordless authentication, 
> > 
> > It's not "passwordless", which is a description of negation.  It is
> > possible to set up accounts and SSH-keys without passwords or
> > passphrases.  Naturally, this is highly insecure.
> A small quibble: Using assymetric key cryptography without passphrases
> is not necessarily insecure. 

Actually, there's another scenario for which this holds, below...

Lack of a passphrase *is* significantly less secure.

> If the private key is secure, then a passphrase is not useful. 

The conclusion requires the premise.

The key must then be secure via shell access, filesystem access *and* by
physical access to all media (you *do* have system backups, correct?).
With a passphrase, even an untrusted root has relatively little
likelihood of access to the key, and physical access / offline data
access is similarly protected against.

> A private key is not really harder to secure than a passphrase is

No, it's much harder to secure.  

A passphrase isn't long-term resident on disk and accessible via
numerous routes.  A passphrase-protected private key is a case of
"something I have + something I know", which works pretty well in

A private key isn't handed around as a password is.  

Threat model, unsecured private key:

    I trust me, my local host, host, and any hosts I use this password
    on, as well as physical security of local and remote hosts, and
    security of offline backups of local and remote hosts, any password
    storage systems I use, and any inadvertant access to any shell
    with access to the private key.

Threat model, passphrase:

    I trust me, my local host, and any password storage systems I use,
    and any inadvertant access to a shell with access to the private
    key, where that shell has activated the key (via ssh-agent).

> and if the private key is accessible to someone, chances are pretty
> good that the passphrase can be as well.

I disagree with that assessment, see threat models above.

> Also, use of a passphrase-encryption on a more-or-less publicly
> available private key means that the "weakest link" in the security
> chain will be the weaker of (1) the assymetric encryption algorithm and
> (2) the symmetric encryption algorithm used to encrypt the private key
> with the passphrase.

...and the inherent guessability of the passphrase (mix of selection and
passphrase length).

My understanding is that 1 & 2 are cryptographically solid.  Which means
that you're protected by the passphrase, and that an unsecured key falls
to the weakest link of physical security of both the system and any data
backups or archives.

> Of course, if the private key is truly private, then the passphrase
> does no harm (other than the minor nuisance it presents to the owner),
> and provides an extra level of protection in the case of *accidental*
> compromise of the private key, for the paranoid (a generally good
> trait to possess).
> Nonetheless, it seems to me that calling the use of public-key
> cryptography without passphrases "highly insecure" is a rather harsh
> exaggeration.

It greatly increases the number of avenues to compromise, and creates a
single token (the private key) which if accessed allows direct access.

By contrast, a passphrase-protected key follows the doctrine of
'something I have, something I know", in providing security, and renders
the key by itself largely useless.

Following my own current practices, my risks are:

  - Someone guesses my passphrase.  They can now use the key without
    limit.  The passphrase is long, random, and not stored in cleartext

  - Someone accesses my system while it's running with ssh-agent
    enabled.  They can now use the key for the duration of that session.

  - Someone knows a cryptographic attack on SSH (none are publicly
    known).  Likelihood of this is low.

Otherwise, opportunities to use my private key without authorization are
pretty slim.

The one exception to an unsecured private key is in the case of a forced
command.  This is a mode of operation in SSH where a specific command is
executed through use of a dedicated public key.  This is useful for such
tasks as unattended backups, rsync triggers, or SSL server initiation.
The risk can be minimized, with an appropriately constructed commande,
to allowing Eve to run your admin tasks for you, with no other
inadvertant program execution or data disclosure.  This isn't an
automatic feature -- you *can* use forced commands to open yourself to
attack.  However with appropriate precautions, it's a case where a
non-passphrase protected key may be used securely.


Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
    The more the merrier.

Attachment: signature.asc
Description: Digital signature

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.