# Wrangler login fails on remote machines: forward port 8976 over SSH
## What happened
Issue cloudflare/workers-sdk#2874 (closed, 28 comments): Unable to authenticate Wrangler in any remote development environment. `wrangler login` opens a browser flow that cannot complete when you are on a remote machine, so authentication never finishes.
## What works
wrangler login fails on remote machines because the OAuth callback is served on port 8976, which your local browser cannot reach on a remote box. Fix: forward port 8976 over SSH when connecting to the remote environment: ssh -L 8976:YOUR_HOST:8976 [your-remote-host]. Then run wrangler login on the remote machine and complete the browser flow locally. Commenter-verified.
## Caveats
This comes from one real issue thread (gh:cloudflare/workers-sdk#2874); it is the verified fix or approach from that thread, not a general manual. Check your version of Cloudflare R2 first , maintainers often fix the underlying bug in a later release, and the thread may predate it.