Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: WRN could not get window size: The handle is invalid. on Windows #141

Open
meowrain opened this issue Apr 26, 2024 · 1 comment

Comments

@meowrain
Copy link

I start my ssh3 server by

ssh3-server -generate-public-cert myserver.domain -url-path /ssh3 -bind 0.0.0.0:22 -enable-password-login

When i'm using ssh3 client on windows to connect my Linux server,it shows WRN could not get window size: The handle is invalid. and then it stucks.
My command is like this:

ssh3 -privkey private_key root@myserver.domain:22/ssh3

But it works well on my PC using Arch Linux.
I don't know if it is a bug....

@Lee-7723
Copy link

Lee-7723 commented Nov 11, 2024

I also ran into the same problem. I'll add some more info on my side if it helps.
The command I ran:
ssh3-server -enable-password-login -url-path / -bind [::]:8022 -v
ssh3.exe -use-password -insecure -v root@my-domain:8022/

client environment:
win11 23H2 (22631)
windows terminal 1.21.2911.0
powershell 7.4.6
ssh3.exe version francoismichel/ssh3 0.1.7

The server side showed no warning or error. Client side had following log:

3:13PM DBG version francoismichel/ssh3 0.1.7
3:13PM DBG no OIDC config file specified, use default file: C:\Users\<username>/.ssh3/oidc_config.json
3:13PM DBG C:\Users\<username>/.ssh3/oidc_config.json does not exist
3:13PM DBG dialing QUIC host at my-ip:8022
3:13PM DBG QUIC handshake complete
3:13PM DBG try password-based auth
password for https://my-domain:8022/?user=root:
3:13PM DBG we only try the first specified auth method for now
3:13PM DBG try the following Identity: password-identity
3:13PM DBG establish conversation with the server
3:13PM DBG send CONNECT request on URL https://my-domain:8022/?user=root, User-Agent="SSH 3.0 francoismichel/ssh3 0.1.7 experimental_spec_version=alpha-00"
3:13PM DBG got response with 200 OK status code
3:13PM DBG server has valid version "SSH 3.0 francoismichel/ssh3 0.1.7 experimental_spec_version=alpha-00" (protocol version = 3.0_alpha-00, software version = francoismichel/ssh3 0.1.7)
3:13PM DBG opened new session channel
3:13PM WRN could not get window size: The handle is invalid.
3:13PM DBG sent shell request, hasWinSize = false

-bash: line 1: $'\r': command not found

-bash: line 2: $'\r': command not found
ls
-bash: line 3: $'ls\r': command not found

The -bash: ... lines at the bottom is when I press enter or any command.
I tried in both the original windows console (the ugly one) and the newer Windows Terminal. Also in powershell7 and cmd. All returns the same log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants