SSH tunneling using Linux Machine

Hi friends,

Earlier I had written about SSH tunnel using a Windows machine. Now I’ll be writing about how I’ll be tunneling through SSH using a Linux machine.

Execute the following command:


For example,

ssh -vD 9999 -C -N

In the above command,

  • -v : verbose mode, output will be detailed.
  • -D [port] : a dynamic unused port number on the remote machine and local machine.
  • -C : enabling compression for faster data transfer
  • -N : Used for forwarding ports only, no command execution.
    This will open a connection between remote machine and local machine, and all the traffic will be then forwarded via the remote machine.

After the command is executed, open the web browser, go to the tools -> settings -> network and make the settings as shown in the screenshot below:

Make Sure to open the port 9999 in the firewall/security groups.

command linux ubuntu ec2 centos network remote ssh terminal proxy hack