[Bug] claude auth login does not complete on headless servers (SSH)
Resolved 💬 3 comments Opened Mar 18, 2026 by n24q02m Closed Mar 18, 2026
Description
claude auth login on headless server (via SSH) displays OAuth URL but never completes. CLI polls for token but polling fails.
Environment
- Claude Code v2.1.77
- Ubuntu 24.04, ARM64, SSH session
Steps to Reproduce
- SSH into headless server
- Run
claude auth login - Copy URL to browser on another machine
- Authorize in browser
- CLI never detects authorization (stays waiting indefinitely)
Expected
CLI detects authorization via polling or accepts pasted authorization code.
Workaround
Copy ~/.claude/.credentials.json from authenticated machine. Token includes refresh token for auto-renewal.
Suggestion
Support device code flow (like Azure CLI) or accept paste-back authorization code for headless environments.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗