socks proxy

Set up the tunnel with this command:

ssh -D 8123 -f -C -q -N sammy@example.com

Explanation of arguments

  • D: Tells SSH that we want a SOCKS tunnel on the specified port number (you can choose a number between 1025-65536)

  • f: Forks the process to the background

  • C: Compresses the data before sending it

  • q: Uses quiet mode

  • N: Tells SSH that no command will be sent once the tunnel is up

Check it is working

ps aux | grep ssh

You should see a line in the output like:

Output
sammy    14345   0.0  0.0  2462228    452   ??  Ss    6:43AM   0:00.00 ssh -D 8123 -f -C -q -N sammy@example.com

Try 2

#On Local Machine
sudo ssh -L 9090:{internal server hostname or IP}:22 root@{gateway server hostname or IP}

Then on the local machine

ftp local