2

I'm running the following ssh command to open a remote session to my network and tunnel RDP through it. What I'm looking to do is open local port 3390 and have it forward out the remote end to 192.168.1.235:3389.

ssh -L 3390:192.168.1.235:3389 srv.my.org

I use a similar setup with putty that works fine. Using Ubuntu/bash on Windows 10 (build 14393), I receive a bind: Address already in use. The ssh session establishes, but not the tunnel. I verified nothing is currently running on either port using netstat -an |grep 3390. Also ran lsof -ti:3390 and received no results.

  • You probably want remote port forwarding, if you want your local 3390 port accessible on the 192.168.1.235. – Jakuje Jan 19 '17 at 8:08
  • @Jakuje I may not be clear on the remote/local definitions. I added a bit on what I'm trying to do. – uSlackr Jan 19 '17 at 13:39
  • Could you try to run "lsof -ti:3390" to see what is using this port ? – tobiasBora Jan 19 '17 at 13:45
  • @tobiasBora Thx. Done and added to question. No results were returned. – uSlackr Jan 19 '17 at 13:47
  • Event if you run it as sudo ? – tobiasBora Jan 19 '17 at 13:59
1

The problem has to do with, by default, the system wanting to use IPv6. If you force to IPv4 it will work. Try one of these options:

ssh -L 127.0.0.1:3390:192.168.1.235:3389 srv.my.org

OR

ssh -L 0.0.0.0:3390:192.168.1.235:3389 srv.my.org

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.