SSH Port forwarding on Windows

19,939

Solution 1

Yes, putty can do port forwarding. Its in the Connection -> Ssh -> Tunnel section of the config.

putty-screenshot.

Just enter the local port in Source port and the externalip:port as the Destination.

For the proxy command see this link.

https://monkeyswithbuttons.wordpress.com/2010/10/01/ssh-proxycommand-and-putty/

Solution 2

The equivalent in PuTTY is "local proxy command". You can use the plink.exe with the -nc switch instead of the ssh with the -W switch.

Solution 3

For me, this worked on Windows 10:

ssh -f user@host -L port:localhost:port-N
Share:
19,939

Related videos on Youtube

Scott Deutsch
Author by

Scott Deutsch

Updated on September 18, 2022

Comments

  • Scott Deutsch
    Scott Deutsch over 1 year

    How can I enable port forwarding for SSH in Windows 10? This is from my Ubuntu box.

    Host ahost
     Hostname ipaddress1
     User usernamehere
    
    Host ahost2
     HostName ipaddress2
     User usernamehere
     LocalForward 5440 externalip:port
     LocalForward 5400 externalip:port
     LocalForward 3300 externalip:port
     ProxyCommand ssh -W %h:%p ahost
    

    Is there a way with putty? since it is SSH tunneling I think.

    • Frank Thomas
      Frank Thomas over 7 years
      please better describe your network. you port forward on a gateway router device. Is your win10 system configured as a gateway router? what roles do the win10 and ubuntu boxes play in the network, where are they in relation to eachother, and where will the remote clients be?
    • Scott Deutsch
      Scott Deutsch over 7 years
      It is just a way for me to ssh into an EC2 computer and tunnel some local ports to that EC2 computer. If that makes sense.
    • Frank Thomas
      Frank Thomas over 7 years
      ahh, ok you are tunneling, not port forwarding. gotcha.