7

I am trying to setup a SSH Tunnel on my Windows machine. Since the bash was introduced in 1607, i don't want to use cygwin anymore. The problem is that the bash always returns the error message: bind: Address already in use. The command I use - which works in cygwin - is:

ssh username@172.11.0.1 -L 8022:173.22.0.1:22

I already tried to use a lot of different ports with no success. I also tried to kill everything on that port using:

lsof -ti:8022 | xargs kill -9

Does anyone have an idea, why I am not able to setup this tunnel? I just want to use cygwin anymore, since I now have an integrated bash in windows.

I am starting the bash in admin mode.

2
  • i don't know about your program. if you use this program can easily create I am trying to setup a SSH Tunnel. Bitvise SSH Server
    – M.R.T
    Sep 1, 2016 at 9:04
  • Which application do you refer to? On the server I am using OpenSSH. I don't see a need to use another software on the server, since it is working in cygwin.
    – ˈvɔlə
    Sep 1, 2016 at 9:53

2 Answers 2

11

In case anyone else finds this, there is a work around... you just need to reformat the tunnel with a specific bind address like this:

ssh -L 127.0.0.1:8022:173.22.0.1:22 username@172.11.0.1

From reading through the bug listing linked in the other answer, it looks like the issue is in the IPv6 subsystem, so I'm guessing this works by forcing IPv4.

Either way it works for me, using a fully updated Win 10 version 1607 install as of Jan 20, 2017.

0
3

It's a known bug and it's tracked here https://github.com/Microsoft/BashOnWindows/issues/739

As an alternative you can try using something like http://sshwindows.sourceforge.net/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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