Socks
SSH Socks
1
ssh -D 1337 -q -C -N [email protected]
Edit
1
echo "socks5 127.0.0.1 1337" >> /etc/proxychains4.conf
proxychains
1
proxychains curl 10.1.1.27
SSH
Forwarding
1
ssh -R 1122:10.5.5.11:22 -R 13306:10.5.5.11:3306 [email protected]
Pass key auth
1
ssh -f -N -R 1122:10.5.5.11:22 -R 13306:10.5.5.11:3306 -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -i /tmp/mao_key/id_rsa [email protected]
- -N : flag to specify that we are not running any commands.
- f : option to request ssh to go to the background.
- -i provide the key file that we are using via