Here is an example of what an SSH private key looks like.
—–BEGIN RSA PRIVATE KEY—–
—–END RSA PRIVATE KEY—–
For this tutorial we are assuming you have a private key stored in a file. We’ll name the file rsakey.
First you want to try and log in to the host via SSH and see if the passphrase is blank using:
#root@kali: ssh -i rsakey firstname.lastname@example.org
Now we need to convert the rsa key to john format and save it in a file:
#root@kali: ssh2john rsakey > rsa2johnfile
Now crack the passphrase using any wordlist:
#root@kali: john –wordlist=/usr/share/wordlists/rockyou.txt –format=SSH rsa2johnfile
When it’s done, you can show the password if it has been cracked by issuing the following command:
#root@kali: john –show rsa2johnfile