Skip to content

SSH

SSH (Secure Shell) is a network protocol that allows secure communication between two computers. It is used to log into a remote machine and execute commands.

Create a reverse tunnel

ssh -R 80:localhost:6969 nokey@localhost.run

Connect via ssh

ssh user@<IP>

Convert putty to openssh

sudo apt install putty-tools
puttygen putty.ppk -O private-openssh -o id_rsa
chmod 600 id_rsa

Bruteforce

Known Username

ssb -p <PORT> -w <WORDLIST> <USER>@<IP>
hydra -l <USER> -t <THREADS> -P <WORDLIST> ssh://<IP>

Private Key

ssh -i id_rsa <USER>@<IP>

IdentitiesOnly

ssh -o IdentitiesOnly=yes -i id_rsa <USER>@<IP>

Crack Private Key

ssh2john

ssh2john id_rsa > id_rsa.hash
john --wordlist=/usr/share/wordlists/rockyou.txt id_rsa.hash