cf auth login (the Cloudflare CLI, not Wrangler or cf the Cloud Foundry tool) assumes it's running on a desktop with a browser. On a remote SSH host with no display, the default flow fails. This explains why, and gives a small helper that logs you in from a headless box using a browser on your local machine.
Verified against cf v0.3.0.