2

I'd like to perform SSH tunneling on Windows. This is extremely trivial on Linux.

ssh -L 7456:someurl.com:7456 A.B.C.D:8080 

This would cause SSH client to listen on 127.0.0.1:7456, and then connections on that port would be tunneled to the remote SSH server (A.B.C.D:8080) and then proxied to someurl.com:7456.

For some reason, I cannot find a similar way to accomplish this. Most people suggested putty, but the GUI makes no sense.

Putty GUI Screenshot

What on earth do I put on the fields to accomplish the same result?

1
  • You would like to ssh to a Windows system? Commented Feb 21, 2017 at 22:18

1 Answer 1

1

You don't need to use the GUI to initiate a PuTTY connection. I actually prefer to just launch it from the Windows Run dialog or a powershell/cmd prompt most of the time.

The Help button in the screenshot you posted will open the PuTTY User Manual. In it, there's a whole section called The PuTTY command line within the section called Using PuTTY. Specifically, section 3.8.3.5 is all about port forwarding. From the manual:

As well as setting up port forwardings in the PuTTY configuration (see section 4.25), you can also set up forwardings on the command line. The command-line options work just like the ones in Unix ssh programs.

To forward a local port (say 5110) to a remote destination (say popserver.example.com port 110), you can write something like one of these:

putty -L 5110:popserver.example.com:110 -load mysession

plink mysession -L 5110:popserver.example.com:110

To forward a remote port to a local destination, just use the -R option instead of -L:

putty -R 5023:mytelnetserver.myhouse.org:23 -load mysession

plink mysession -R 5023:mytelnetserver.myhouse.org:23

Based on your example, the command line would be something like this.

putty -L 7456:someurl.com:7456 -ssh A.B.C.D:8080 

Also if you actually want to know how to use the GUI for setting up a tunnel, that's in section 4.25 called The Tunnels panel.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.