How to identify passphrase-less ssh-keys?

Hi,

given two ssh private key files (rsa or dsa), how can someone determine if this key is protected by a passphrase? I generated two different keys as a test (one with passphrase and one without) and can't figure out how to identify the passphrase-less key.

Thanks,
honk
 
You can't? Password protected private keys are encrypted, and they should begin with a header stating that fact.

Like mine:

Code:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
 
Hmm.. You're right.. But only on the private part.

Password protected private keys have:
Code:
-----BEGIN DSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,<code>

Passwordless private keys only have:
Code:
-----BEGIN DSA PRIVATE KEY-----
 
Back
Top