22 SSH

Login with username

ssh username@10.10.10.10

Doing ssh in existing ssh session

ssh -o IdentitiesOnly=yes -i /home/remi/.ssh/keys/root root@127.0.0.1

Create RSA public/private key

ssh-keygen

Login with RAS private key

ssh -i file.key 10.10.10.10

escape restricted shell (rbash)

ssh uname@10.10.10.10 -t bash

Brute force users-passwords

hydra -L users.txt -P pass.txt ssh://10.10.10.184

Local port-forwarding

ssh -L [local-port]:[remote-ip]:[remote-port]
ssh -L 5000:127.0.0.1:5901 charix@10.10.10.84

###############################

sshpasswd -p 'password123' ssh nadine@10.10.10.184 -L 8443:127.0.0.1:8443

###############################

# while inside ssh session
# 1. press enter 2 times
# 2. enter the below command
~C
# 3. this will diable commandline , sfter that enter the below commanding
-L 8443:127.0.0.1:8443

Convert Putty-Key ⇒ OpenSSH-Key

chevron-rightSample putty keyhashtag

Crack Private-SSH key passphrase/password

Last updated