PowerShell / Win32-OpenSSH

Win32 port of OpenSSH
7.2k stars 740 forks source link

Windows 10 ssh Doesn't support TUN tunneling even if we add a TAP-Windows adapter #2162

Open szaszg opened 8 months ago

szaszg commented 8 months ago

Prerequisites

Steps to reproduce

Windows 10 ssh Doesn't support TUN tunneling. (No. 3. in this issue: https://github.com/PowerShell/Win32-OpenSSH/issues/1647)

We add a TAP-Windows adapter:

C:\Program Files\OpenVPN\bin>tapctl create --name tap102
{A2A21221-9F22-46B1-A430-FE9F4CD6D1B5}
C:\Program Files\OpenVPN\bin>tapctl list
{236FF470-24C2-4B57-B09C-EDECCAF70A7B}  OpenVPN Wintun
{F4FFDCC0-6FD0-40DC-A32B-6A783217AE3F}  OpenVPN TAP-Windows6
{A2A21221-9F22-46B1-A430-FE9F4CD6D1B5}  tap102
C:\Users\User name>ssh -w 102:102 username@hostname
Tunnel interfaces are not supported on this platform
Tunnel device open failed.
Could not request tunnel forwarding.

Expected behavior

OpenSSH should support TUN interfaces on Windows.

Actual behavior

Tunnel interfaces are not supported on this platform.

Error details

No response

Environment data

C:\Users\informatika\.ssh>powershell $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.1023
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1023
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version

OpenSSH_for_Windows_9.4p1, LibreSSL 3.7.3

Visuals

No response

tgauth commented 8 months ago

Thanks for opening as a separate issue! There is still work that needs to be done to support this on Windows.

ErSoul commented 4 months ago

Any update on this issue? Seems it ain't easy task...

If anybody knows a workaround for this (not including WSL or docker) please let me know if possible.

I got the same results for the OpenSSH client built for git-windows:

$ ssh -V
OpenSSH_9.5p1, OpenSSL 3.1.4 24 Oct 2023

And for the Win11 OpenSSH client:

C:\>ssh -V
OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3