cloudflared is setup on a device (raspberry pi) and I have been using it successfully to access websites hosted there through a Cloudflare tunnel. I would like to get ssh working over the tunnel from a mac. I followed the tutorial, but have been unable to get it to work:
bash-3.2$ ssh [email protected]
2022-02-14T19:35:42Z ERR failed to connect to origin error=“websocket: bad handshake” originURL=https://ssh.aohomedesign.com
websocket: bad handshake
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535
Thanks for the link. I checked the items in the troubleshooting list and they all look good:
“Your cloudflared tunnel is either not running or not connected”
[tunnel is up and connected, I am able to use the tunnel for http requests]
cloudflared tunnel info mytunnel
NAME: mytunnel
ID: 78d9fbef-e7fb-440d-a735-0ca82153e285
CREATED: 2022-02-08 17:21:47.094025 +0000 UTC
CONNECTOR ID CREATED ARCHITECTURE VERSION ORIGIN IP EDGE
e314518c-e750-4fc6-bcda-541ddbc4feb5 2022-02-14T20:59:52Z linux_arm 2022.2.0 73.17.98.218 2xBOS, 2xPHL
“WebSockets are not enabled”
[websockets are enabled]
“Your Cloudflare account has Universal SSL enabled and the SSL/TLS encryption
mode is set to Off. To resolve, set the SSL/TLS encryption mode to any
setting other than Off.”
[SSL/TLS encryption mode is Flexible]
“Your requests are blocked by Super Bot Fight Mode.
To resolve, make sure you set Definitely automated to Allow in the bot
fight mode settings.”
I will look through the rest of the troubleshooting articles, but so far, no luck: http works, but ssh does not.
Is there a way to get debug info from cloudflared? I suspect there is an issue with cloudflared, but I am unable to get any additional info to make progress.
To test this, I ran a new instance of sshd, in debug mode using port 2222, and reconfigured cloudflared recognize this port. Viewing the command line output on the origin, I can see that the sshd is never receiving the connect request. In addition, the ssh command is failing immediately on the mac.
I need to see the detailed logs from the cloudflared to make any progress on this. I appreciate your help.
I typed the following at the origin:
cloudflared tunnel --loglevel debug
2022-02-17T14:40:55Z DBG Loading configuration from /etc/cloudflared/config.yml
Use cloudflared tunnel run to start tunnel 78d9fbef-e7fb-440d-a735-0ca82153e285
I then tried to access ssh via the browser, as above, with the same result. Can you tell me how to access the logs? Is there anything else I need to do (restart cloudflared?)
Thanks.