Skip to content

ssh2jonh.py

There is a Python script called ssh2john.py for SSH keys, which generates the corresponding hashes for encrypted SSH keys, which we can then store in files. It's preinstalled in Kali linux:

Basic commands

Save the ssh private key as a hash:

ssh2john.py SSH.private > ssh.hash

Now we can crack the hash with johntheripper:

john --wordlist=rockyou.txt ssh.hash
Last update: 2025-01-19
Created: January 19, 2025 22:33:25