1

I need reverse-SSH access to Windows Subsystem for Linux (WSL) Ubuntu. Normally this isn't a problem with Linux machines but with WSL it isn't working.

First I establish the reverse SSH connection from WSL to my server:

ssh -R 19999:localhost:22 [email protected]

From my server I then attempt to connect to this reverse SSH tunnel:

ssh user@localhost -p 19999

For a standard Linux machine, the connection should now be established. With WSL, instead I encounter the following type of error:

connection closed by ::1 port 19999

Why is this going wrong? How can I get this working?

3
  • Works for me (WSL on 1703). How are you starting sshd? What do the logs say?
    – jjlin
    Commented Mar 20, 2018 at 6:55
  • It may be related to this : superuser.com/questions/1352714/… Commented Oct 10, 2018 at 10:06
  • can you ssh yourself within WSL? in other words, is there a sshd running? Commented Jan 23, 2019 at 5:45

1 Answer 1

0

Try

ssh -R 127.0.0.1:19999:127.0.0.1:22 [email protected]

and

ssh [email protected] -p 19999

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .