PowerShell / PowerShell/Win32-OpenSSH

Win32 OpenSSH Reverse Connection Tunnelling is not working

Open
#1,265 12 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Discussion-Deprecated/use GitHub discussions
Dominant language
No language data
Stars
8.3k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

Server OperatingSystem
any linux based os

Client OperatingSystem
Windows 10 with Spring Update

What is failing
There is definitely a bug in Microsoft OpenSSH implementation from 2018 Spring Update.

How to test it :
On the local (Windows 10), install Python3, Putty and make sure ssh is available.
Then

  1. Run a python http server in a terminal (on port 8000 by default)

    python -m http.server

  2. Create a reverse connection ssh tunnel

    ssh -R 8080:localhost:8000 user@remote

On the remote, connect trough the tunnel with telnet
On The remote, connect to it trough telnet

>telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

The tunnel is still runnning but telnet disconnect almost instantly after the connection.

If you replase ssh by the plink.exe from putty, it works flawlessly and you can connect with a browser.

Expected output

    >telnet localhost 8080
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.

Actual output

    >telnet localhost 8080
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    Connection closed by foreign host.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Windows 10 reverse tunnel using python -m http.server, ssh -R 8080:localhost:8000, and telnet, then compare it with the working plink.exe behavior. Done means the reverse tunnel stays connected and the remote endpoint can serve the local HTTP server without an immediate disconnect.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.