Skip to content

websocat issues on windows (ssh example) #1006

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

Closed
mfranciszkiewicz opened this issue Sep 10, 2022 · 4 comments · Fixed by #1027
Closed

websocat issues on windows (ssh example) #1006

mfranciszkiewicz opened this issue Sep 10, 2022 · 4 comments · Fixed by #1027
Assignees
Labels
0.10 impact: high impact: most users affected severity: minor severity: loss of minor functionality

Comments

@mfranciszkiewicz
Copy link
Contributor

> websocat --version
websocat 1.10.0

# ssh cmd from Powershell:
> ssh -o ProxyCommand='websocat asyncstdio: ws://127.0.0.1:7465/net-api/v1/net/bb2a7e1ca46a45f088cec4cef3e29401/tcp/192.168.0.2/22 --binary -H=Authorization:"Bearer 1a24ac129fb34434b0f65ebded75d519"' root@4f0db648aebb45679fbb2ba86b897a90
websocat: Unknown address or overlay type of `asyncstdio:`
kex_exchange_identification: Connection closed by remote host

# ssh cmd from Cmd Prompt
>ssh -o ProxyCommand='websocat asyncstdio: ws://127.0.0.1:7465/net-api/v1/net/bb2a7e1ca46a45f088cec4cef3e29401/tcp/192.168.0.2/22 --binary -H=Authorization:"Bearer 1a24ac129fb34434b0f65ebded75d519"' root@4f0db648aebb45679fbb2ba86b897a90
CreateProcessW failed error:2
posix_spawnp: No such file or directory
@shadeofblue shadeofblue added impact: high impact: most users affected severity: minor severity: loss of minor functionality labels Sep 12, 2022
@jalas167
Copy link

based on: PowerShell/Win32-OpenSSH#1185 added full path and removed ' around websocat comman to get:

ssh -o "ProxyCommand=C:\Users\golem.cargo\bin\websocat.exe asyncstdio: ws://127.0.0.1:7465/net-api/v1/net/078025b62521435782b12a208376141c/tcp/192.168.0.4/22 --binary -H=Authorization:"Bearer 5c3f6bb221954498ba664ad41b85be5d "" root@b020e898fcb7438a9cf5eb3830409039
websocat: Unknown address or overlay type of asyncstdio:
kex_exchange_identification: Connection closed by remote host

@shadeofblue
Copy link
Contributor

suggested solution: replace websocat with a local socket proxy in yapapi?

@shadeofblue shadeofblue self-assigned this Oct 10, 2022
@jalas167
Copy link

jalas167 commented Oct 13, 2022

based on: https://github.com/vi/websocat/blob/master/doc.md

asyncstdio:
Internal name for --dump-spec: AsyncStdio

[A] Set stdin and stdout to nonblocking mode, then use it as a communication counterpart. UNIX-only. May cause problems with programs running at the same terminal. This specifier backs the --async-stdio CLI option.

Maybe we should not use that option (AsyncStdio:) during tests on windows?

when tried:

ssh -o "ProxyCommand=C:\Users\golem.cargo\bin\websocat.exe ws://127.0.0.1:7465/net-api/v1/net/078025b62521435782b12a208376141c/tcp/192.168.0.4/22 --binary -H=Authorization:"Bearer 5c3f6bb221954498ba664ad41b85be5d "" root@b020e898fcb7438a9cf5eb3830409039

output is (golem example was not running):

websocat: WebSocketError: I/O failure
websocat: error running
kex_exchange_identification: Connection closed by remote host

@shadeofblue
Copy link
Contributor

we will resolve it by including a generic socket proxy in yapapi itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.10 impact: high impact: most users affected severity: minor severity: loss of minor functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants