Help ssh2john

@Beast01 PM me if ur still having a problem

ty i got this

Looking for mentorship!
DM is willing to help with ssh2john thanks

Quick pointer: If you’re using a current Kali VM, ssh2john is a python script located under /usr/share/john/ssh2john.py

If you have the private SSH key you first need to generate a hash from it that john can work with:
python /usr/share/john/ssh2john.py id_rsa > id_rsa_hash.txt

Run john with rockyou or whatever list you want to use:
john --wordlist=/usr/share/wordlists/rockyou.txt id_rsa_hash.txt

Same here.

~/Downloads/software/john/ssh2john.py id_rsa > id_rsa.hash
john id_rsa.hash --wordlist=~/Downloads/rockyou.txt
Output: No password hashes loaded (see FAQ)

john was unable to load the hash. Any ideal?

Does it display any errors or odd formatting if you just display the results to the console instead of piping to id_rsa.hash?

Type your comment> @hva said:

Quick pointer: If you’re using a current Kali VM, ssh2john is a python script located under /usr/share/john/ssh2john.py

If you have the private SSH key you first need to generate a hash from it that john can work with:
python /usr/share/john/ssh2john.py id_rsa > id_rsa_hash.txt

Run john with rockyou or whatever list you want to use:
john --wordlist=/usr/share/wordlists/rockyou.txt id_rsa_hash.txt

This is the correct answer @xVoid

You can’t use John to brute force the private key directly, you send it to ssh2john.py which gives you a hash. Then you run ‘John /path/to/file /path/to/wordlist’ in sudo and it will crack.

need so assistance. im trying to use ssh2john but i keep getting “id_rsa is not a valid private key file”.

i am running the follow in command:

“python ssh2john.py ~/Documents/HTB/OpenAdmin_10.10.10.171/id_rsa > id_rsa.txt”.

The id_rsa file isn’t correct. You may have added characters when you tried to copy it down or missed something.

is the sha512 in i******l not relevant?

Type your comment> @LMAY75 said:

Try this:
john --wordlist=/usr/share/wordlists/rockyou.txt crack.txt

Assuming your rockyou list is still in /usr/share/wordlists… otherwise include your file path

ty it worked

@FlompyDoo said:

is the sha512 in i******l not relevant?

Relevant to what? Not to ssh2john.

Relevant at all? Just wondering if the SHA512 hash plays a role in a later stage (finding root.txt)

i am stuck on decrypting ssh key i first convert my keyfile into hashfile with ssh2john then i run john hashkey --wordlist=/opt/wordlists/rockyou.txt but it showing me ouput that “No password hashes loaded (see FAQ)”
please help me even i tried coping and paste same key multiple times.

Hello guys.
Idk why my John the Ripper

$ /usr/share/john/ssh2john.py idrsa.id_rsa > crack
$ john --format=SSH --wordlist=/usr/share/wordlists/rockyou.txt crack
Using default input encoding: UTF-8
Loaded 1 password hash (SSH [RSA/DSA/EC/OPENSSH (SSH private keys) 32/64])
Cost 1 (KDF/cipher [0=MD5/AES 1=MD5/3DES 2=Bcrypt/AES]) is 0 for all loaded hashes
Cost 2 (iteration count) is 1 for all loaded hashes
Will run 8 OpenMP threads
Note: This format may emit false positives, so it will keep trying even after
finding a possible candidate.
Crash recovery file is locked: /home/bat/.john/john.rec

Does anyone know why it happend ?

Sry for this message I made some updates and it went well

same here, any advice?