"Leave cloudflared running to download the token automatically"
I use cloudflare SSH tunnels to access some of my remote servers.
My SSH config and everything is configured well - it does work:
However, when I try to ssh into the server I always have to manually click the URL it generates, i.e.:
and then wait for the callback to complete, and then finally I'm connected.
After that minorly annoying process, I'm teased by
cloudflared
with this message:
Leave cloudflared running to download the token automatically ๐That smug cli is telling me my life could be way easier if I just leave it running - super! Except.. can I? Any time I try to install the cloudflared service worker:
sudo cloudflared service install
, it complains:
Okay fine, so I make an empty config file in /etc/cloudflared
:
And then sudo cloudflared service install
:
But.. I don't want to make a tunnel? I'm trying to connect to a tunnel.
I have to give it information about a tunnel that I do not want to start?
Am I missing something? Can I just give it dummy data or something? Do I have to configure it with the specific tunnel that I'm trying to connect to?6 Replies
To clarify: this isn't a big deal, but it seems like I could have a nicer setup if I figured this out, so I'm just looking for some advice
I'm pretty sure that message just means to leave cloudflared running while you do the browser auth. As in you don't need to manually enter something
There's some docs on this feature here: https://developers.cloudflare.com/cloudflare-one/applications/non-http/#automatic-cloudflared-authentication
I haven't used it myself though, but looks like you have to enable it under Additional settings in the access app settings
Add non-HTTP applications ยท Cloudflare Zero Trust docs
You can connect applications to Cloudflare Zero Trust over a number of different protocols.
Isn't that just to auto-approve the access requests and not the login requests?
ah yea I see, he was just thinking the normal "keep your cloudflared running" message meant something more then just it needing to be running for the callback to work.
My understanding is if you were logged in with that feature enabled, it would just auto approve it:
This option will still prompt a browser window in the background, but the authentication will be automatic.Maybe what he's looking for anyway? I haven't played around with it myself though
I was hoping I could run a cloudflare daemon that would negotiate the auth for me in the background.
More realistically, I think I just need to fix my terminal not opening my web browser automatically and that'll fix 60% of the annoyance