HOWTO: ssh port-forwarding

Windows XP Users:

Download plink and copy the file to your windows/system32 directory.

In a command prompt, type plink -L (local port):(remotehost):(remote port) (ssh server).

The -L tells plink you want to port forward, local port is the port # you want plink to listen on locally, remotehost is the destination server you want the ssh server to forward your packet to, remote port is the port # listening on that destination server, and ssh server is the ssh server that’ll be doing the port forwarding for you.

Let’s say for example you want to use Remote Desktop (rdp) to connect to your Windows XP desktop at home which is on the same local network as your ssh server. Your WinXP Desktop has a local IP of 192.168.10.11. Your ssh server has a local IP of 192.168.10.10. Your ssh server is translated by your router to a public address of 1.2.3.4. You’re at work and you need to access your computer. What you would do then is type the following in command prompt on the computer you’re on:

plink -L 1555:192.168.10.11:3389 1.2.3.4

1555 is just an arbitrary local port number I picked. 3389 is the default port number used by Windows Remote Desktop. Once the connection is established, open up remote desktop and connect to localhost:1555 and you should be connected.

Unix users: You would use ssl -L (local port):(remotehost):(remote port) (ssh server) -l (username) instead.

5 Responses to “HOWTO: ssh port-forwarding”

  1. UW football: Outback Bowl excited…

    UW football: Outback Bowl excited to land BadgersThe Capital Times, WI -1 hour agoA UW-Arkansas game would be a rematch of last…

  2. LEADERSHIP IS HIS PASSION (The…

    PRUNEDALE -While Joey Hayes says he’s enjoyed his summer off from school, he hasn’t exactly been on vacation….

  3. Chat with Tommy Smyth -…

    Chat with Tommy SmythESPN -Sep 27, 2007Tony Toronto Canada: For your money, who is a better player…Rooney or Messi. Thanks :…

  4. Arlington Cowboys up – Austin…

    Arlington Cowboys upAustin American-Statesman (subscription), TX -Jul 7, 2007One more stop on the Arlington tour: Alley Cats, a bowling alley, arcade, billiard…

  5. NOGGIN Celebrates Storytelling with a…

    NOGGIN Celebrates Storytelling with a New Premiere Week of Pinky …Earthtimes.org -Feb 27, 2007Monday, March 26 (3:00 pm, ET) – “Tyler…