«

»

Jul 08

Hotw to tunnel by ssh from local server to remote One.

Taken From : http://www.revsys.com/writings/quicktips/ssh-tunnel.html

ssh -f user@personal-server.com -L 2000:personal-server.com:25 -N

(working example ssh -f root@192.168.40.91 -L 0.0.0.0:8585:192.168.40.91:8585 -N)
The -f tells ssh to go into the background just before it executes the command. This is followed by the username and server you are logging into. The -L 2000:personal-server.com:25 is in the form of -L local-port:host:remote-port. Finally the -N instructs OpenSSH to not execute a command on the remote system.

To kill tunnel use:

 netstat -anp | grep 8585    —–> find process ID
kill -9 process ID


1 comment

  1. corvette parts

    I was able to find good information from your blog articles.

Leave a Reply

Your email address will not be published. Required fields are marked *


six − 5 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>