cloudflare / cloudflare/cloudflared
🐛 Cannot connect to SSH when using cloudflared on WSL
- Dominant language
- Go
- Stars
- 15.6k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When using cloudflared, ssh errors with
```
debug1: SSH2_MSG_KEXINIT sent
Bad packet length 1231976033.
ssh_dispatch_run_fatal: Connection to UNKNOWN port 65535: message authentication code incorrect
```
The exact same configuration works in
1) ✔️ Windows.
2) ✔️ Ubuntu machine on the same network (but not in WSL).
3) ✔️ Ubuntu machine on a different network.
But doesn't work in
4) ❌ Ubuntu in WSL
**To Reproduce**
1. Install cloudflared on all machines.
2. Set up tunnel to add ssh.host.com to point to localhost:22.
3. Add
```
Host ssh.host.com
Hostname ssh.host.com
User git
ProxyCommand /usr/local/bin/cloudflared access ssh --hostname %h
```
to `~/.ssh/config`
5. Sign in with `ssh git@ssh.host.com `
6. Click OK in browser
7. Error.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Environment and versions**
`Linux HOST 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux`
Contributor guide
Assessment
This issue has not been assessed yet.