I'm trying to use the ssh client command available in windows 10 since the spring update.
I do not use the "OpenSSH Server" optional module and it is not installed, I'm using only the "OpenSSH client"
This ssh command seems to work correctly, I can connect to a remote linux ssh server, and even use ssh tunelling with the following command
ssh -L 8080:localhost:11111 user@remote
And then connect with my own application through localhost:8080 from the windows client.
But the reverse tunneling does not seem to work.the following command :
ssh -R 8080:localhost:11111 user@remote
is working and the port is opened on my remote server, as show by nc on my remote linux:
nc -v 127.0.0.1 8080
localhost.localdomain [127.0.0.1] 8080 (http-alt) open
But the reverse tunnel is not working and I cannot communicate trough the tunnel.
Is this a bug in microsost ssh implementation ? Am I doing something wrong ?
I have completely disabled the windows firewall, have no other firewall installed and am connected on a private network.
Answer
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
Run a python http server in a terminal (on port 8000 by default)
python -m http.server
Create a reverse connection ssh tunnel
ssh -R 8080:localhost:8000 user@remote
On the remote, connect trough the tunnel with 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.
You can find my bug report here : https://github.com/PowerShell/Win32-OpenSSH/issues/1265
No comments:
Post a Comment