How to check if an ssh key has passphrase

To check if an ssh key has passphrase, one can look for the presence of ENCRYPTED string in the private key. Here is an example

$ grep ENCRYPTED ~/id_rsa
Proc-Type: 4,ENCRYPTED

In case ENCRYPTED string is present, the key is encrypted and will need a passphrase during use.

Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments