[BUG] Desktop app SSH remote session fails with 403 Request not allowed while Local session and CLI-over-SSH work fine (same account)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
What happens:
In the desktop app, any message (even just hi) sent in an SSH remote session returns:Failed to authenticate. API Error: 403 Request not allowed
A Local session in the same desktop app, signed in with the same account, works normally.
Key contrast that isolates it:
SSH-ing into the same remote server and running the claude CLI directly, with the same account (Claude Pro), works perfectly — including Opus 4.8. So the server's network, egress IP, credentials, and account entitlements are all fine. The 403 only appears on the desktop app's SSH-remote path.
Already ruled out:
- SSH connection itself is fine (host-key issue resolved separately)
- Remote
~/.claude/settings.jsonis{"model": "opus", ...}— no gated model env | grep -i anthropicon the server is empty (no strayANTHROPIC_API_KEY/ANTHROPIC_BASE_URL); also checked under non-interactive shell- Local and remote sessions are signed into the same account
- Tried: full sign-out + Cmd+Q + browser OAuth re-login; removed and re-added the SSH environment — still 403
Environment:
- Claude Code: v2.1.168 (remote server side)
- Desktop app version: Claude 1.15200.0 (250bae)
- Local OS: macOS
- Remote: Linux server, SSH port 2222
- Plan: Claude Pro
Reproducible: Yes — Local session always works, SSH remote session always 403s.
What Should Happen?
Successfully work with claude code with ssh connected to the remote server on ios DESKTOP app.
Error Messages/Logs
Authentication failed
Sign in again to continue.
Failed to authenticate. API Error: 403 Request not allowed
Steps to Reproduce
Login to the mac claude desktop app, establish ssh to the remote server successfully, then talk to claude.
Claude Model
_No response_
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.168
Platform
Other
Operating System
macOS
Terminal/Shell
Other
Additional Information
<img width="509" height="188" alt="Image" src="https://github.com/user-attachments/assets/34ef2451-14ce-4043-bd9d-5a76cc14a471" />
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗