Enrolling cli-only servers in warp-cli

Hi all, I wonder if anyone has had success in enrolling a headless linux environment into warp zero trust for private networking? I was hoping to create a connection through cloudflare to connect two of my servers together, but I could not figure out how to properly authorise the servers. I have installed warp-cli and there is indeed warp-cli teams-enroll, but that then attempts to open a browser window. If I open a browser window on my laptop, it seems that I can authorise and obtain a callback URI, but I'm totally lost as to what to do from then on. Any help appreciated. Thanks!
5 Replies
Cyb3r-Jak3
Cyb3r-Jak3ā€¢5mo ago
Yeah you can. If you do the login on a client then you can use the token you get, in the url, and use it as a flag with the enroll command. I can get the exact steps when Iā€™m done with work later.
moohr
moohrā€¢5mo ago
tysm!
Cyb3r-Jak3
Cyb3r-Jak3ā€¢5mo ago
Alternatively, if it's just the lack of browser that's an issue, you can generate a token on a device that does have a browser and use it on the server: * Go to https://<team>.cloudflareaccess.com/warp and authenticate. * On the 'Success' page in the browser, right click and 'Inspect' the blue 'Open Cloudflare WARP' button. Copy the long token that's shown linked to the button, and then type the following into a command prompt on the remote server: warp-cli teams-enroll-token https://<team>.cloudflareaccess.com/auth?token=<token you copied>.
moohr
moohrā€¢5mo ago
thanks! got it done. perhaps this should be in warp-cli --help xD
Cyb3r-Jak3
Cyb3r-Jak3ā€¢5mo ago
Yeah I agree. I only learned of this way because of a support ticket šŸ˜