Trying to set up Cloudflare tunnel ssh using Termius ios app and I'm failing spectacularly. reddit / selfhosted ---------------------------------------------------------------------- quasimodoca · 2023-11-29 20:15 I moved my previous setup to Cloudflare tunnels for my Plex *arr stack. Works perfectly. Users get to Overseerr no problem and my stats on Cloudflare no longer show thousands of hits by bots and crawlers from all over the globe. The only problem I'm having and I can't wrap my heard around is how to access my servers ssh using the Termius app on IOS. If I set up a public hostname to it it failes because it's not getting the prompt for auth. There is no way to add custom headers into the client to use the service auth token (that I know of). I tried reading the docs for a private network using the Warp client on my phone, which I have installed and registered with my team and it now shows as using the VPN. So theoretically my phone is now going through cloudflare. I've had to resort to using the IP address of my home network and port forwarding to my Ubuntu box to ssh in. I am using an alternate port on the ssh server ie 2555 and the external port is 2556 so that somewhat hides it. I also disabled password login, root login and required key login. Anyone have any insight on how to accomplish this or is it just not possible with the Termius app on ios? ---------------------------------------------------------------------- adamshand · 2023-11-29 21:03 I've never used Terminus, but SSH over Cloudflare tunnels requires that you use `cloudflared` binary as a proxy on the client. For example, this is how I set it up in my `~/.ssh/config` file. This allows me to SSH into any host with a domain of `example.nz` but putting `.cf` after the hostname (eg. `ssh plex.cf`). ``` Match host "*.cf" ProxyCommand /usr/local/bin/cloudflared access ssh --hostname $(echo %h | sed 's/\.cf$/.example.nz/') ``` ---------------------------------------------------------------------- amcco1 · 2023-11-30 05:32 Ssh requires you to install the cloudflared client on your device that you are try to connect with. Cloudflare Tunnels is really only food for http/s, all other protocols require a cloudflared client. ---------------------------------------------------------------------- quasimodoca · 2023-11-30 19:22 I can't do this on my iPhone which is what I'm trying to do. ---------------------------------------------------------------------- quasimodoca · 2023-11-30 19:22 Like I said in the title text, I have my IPhone set up on Warp. ---------------------------------------------------------------------- adamshand · 2023-12-01 04:27 That was sort of my point. You need the cloudflared binary in order to proxy SSH through Cloudflare. That said, you probably could do this with iSH if you were really really desperate. https://ish.app/ ---------------------------------------------------------------------- Technical-Cry3239 · 2023-12-10 18:13 I just tried. At the VERY FIRST execution the cloudflared binary for x86\_32 fails with fatal: morestack on g0 SIGILL: illegal instruction PC=0x0 m=2 sigcode=128 instruction bytes: But then as I ssh again, it worked ! ---------------------------------------------------------------------- Technical-Cry3239 · 2023-12-10 18:17 Same situation (but I have iPadPro gen3 with iPadOS 17.1.2). I installed [https://ish.app/](https://ish.app/) and then the cloudflared x86\_32 from [https://github.com/cloudflare/cloudflared/releases/latest/download/cl oudflared-linux- 386](https://github.com/cloudflare/cloudflared/releases/latest/downloa d/cloudflared-linux-386) It is working erratically.... crashing iSH emulation before or after the connection. Needs debugging. ---------------------------------------------------------------------- adamshand · 2023-12-10 19:51 With iSH? Neat!