Tunnel randomly fails on startup

a random tunnel fails when starting the client about 1/3 of the time. this happens independently from other tunnels working correctly on the same client and server.

2024/09/28 18:25:50 SyncTunnels
2024/09/28 18:25:50 New tunnel a
2024/09/28 18:25:50 New tunnel b
2024/09/28 18:25:50 New tunnel c
2024/09/28 18:25:50 New tunnel d
2024/09/28 18:25:50 BoreTunnel b
2024/09/28 18:25:50 BoreTunnel a
2024/09/28 18:25:50 BoreTunnel d
2024/09/28 18:25:50 BoreTunnel c
2024/09/28 18:25:50 BoreTunnel error:  Failed to dial: ssh: handshake failed: read tcp (client ip):34948->(server ip):22: read: connection reset by peer

ssh version on both client and server are OpenSSH_9.6p1 Ubuntu-3ubuntu13.5, OpenSSL 3.0.13 30 Jan 2024

it happens to each tunnel with about 11% chance. So sometimes multiple tunnels are broken at once and sometimes they all work.

help please;;;;;;;;;;;;;;;;;;;;;;;;;;;

Sorry for the delay @afwvefdasv! Unfortunately I’m not sure what the problem might. I’m pretty sure this same thing happens to me. I usually just restart the client until the tunnel I’m trying to use works. Sorry that’s not a great answer.

In terms of a solution, your best bet in the short run would be finding a more robust tunneling solution on my list: GitHub - anderspitman/awesome-tunneling: List of ngrok/Cloudflare Tunnel alternatives and other tunneling software and services. Focus on self-hosting.

Long term, I’m working on a successor to boringproxy that should retain most of the features but be much more reliable.

Thanks, I ended up setting up rathole and it’s working well, automatically reconnects if anything goes wrong

1 Like

Glad you found something that works! rathole has always looked like a solid option.