claude-code - 💡(How to fix) Fix [BUG] SSH Remote: RPC ping timeout too short for Azure Bastion tunnel connections [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49094Fetched 2026-04-17 08:51:02
View on GitHub
Comments
3
Participants
2
Timeline
9
Reactions
0
Timeline (top)
labeled ×4commented ×3mentioned ×1subscribed ×1

Error Message

13:28:26 [warn] [RemoteServerController] Ping failed, marking connection dead: RPC call to server.ping timed out

Error Messages/Logs

Code Example

13:28:21 [info] [RemoteServerController] Connected to remote server (94813ms, trigger: send_message, reused: false)
13:28:26 [warn] [RemoteServerController] Ping failed, marking connection dead: RPC call to server.ping timed out

---

2026/04/16 09:28:27 [Server] RPC request: method=server.ping, id=1
2026/04/16 09:28:27 [Server] RPC response sent: id=1, hasError=false
The server receives the ping at 09:28:27 UTC and responds successfully (hasError=false), but the client (at UTC+4 = 09:28:21 UTC send time) already timed out after 5 seconds. The Azure Bastion tunnel adds ~6-7 seconds of round-trip latency to RPC messages traversing the SSH exec channel.

---

<details> <summary>Full ssh.log (client side)</summary>
[attach ssh.log contents]
</details><details> <summary>Full remote-server.log (server side)</summary>
Claude remote server listening on /lustrefs/shared/ali.filali/.claude/remote/rpc.sock
2026/04/16 09:28:27 [Server] New connection from: @
2026/04/16 09:28:27 [Server] RPC request: method=server.ping, id=1
2026/04/16 09:28:27 [Server] RPC response sent: id=1, hasError=false
2026/04/16 09:30:09 [Server] New connection from: @
2026/04/16 09:30:09 [Server] RPC request: method=server.ping, id=1
2026/04/16 09:30:09 [Server] RPC response sent: id=1, hasError=false
</details>
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The Claude Code desktop app's SSH remote feature fails to establish a stable connection when connecting through an Azure Bastion tunnel. The RPC server starts successfully and responds to pings, but the responses arrive after the 5-second ping timeout due to Bastion tunnel latency (~6-7 seconds round trip).

Environment Claude Code Desktop App version: cee98937dc257e6af64e712d71dbe4497eb82452 Remote CLI deployed: v2.1.110 Local OS: macOS (Apple Silicon) Remote OS: Ubuntu 22.04.5 LTS (Azure VM) Connection method: Azure Bastion tunnel → SSH → RPC Unix socket Remote filesystem: Lustre

The desktop app successfully: ✅ Connects via SSH ✅ Deploys the claude-ssh server binary ✅ Deploys the CLI (v2.1.110) ✅ Starts the remote server (gets PID) ✅ Opens exec channel to rpc.sock ✅ Reports "Connected to remote server" Then 5 seconds later, the ping times out:

Client log (~/Library/Logs/Claude/ssh.log):

13:28:21 [info] [RemoteServerController] Connected to remote server (94813ms, trigger: send_message, reused: false)
13:28:26 [warn] [RemoteServerController] Ping failed, marking connection dead: RPC call to server.ping timed out

Server log (~/.claude/remote/remote-server.log):

2026/04/16 09:28:27 [Server] RPC request: method=server.ping, id=1
2026/04/16 09:28:27 [Server] RPC response sent: id=1, hasError=false
The server receives the ping at 09:28:27 UTC and responds successfully (hasError=false), but the client (at UTC+4 = 09:28:21 UTC send time) already timed out after 5 seconds. The Azure Bastion tunnel adds ~6-7 seconds of round-trip latency to RPC messages traversing the SSH exec channel.

This cycle repeats indefinitely — every reconnection attempt follows the same pattern.

Additional Issue: Lustre Filesystem Initially, the server was rejecting pings as Unauthorized: invalid or missing auth token when the RPC socket lived on the Lustre distributed filesystem. Creating a symlink from ~/.claude/remote/ to /tmp/ (local ext4) resolved the auth issue, but the timeout remains.

Suggested Fix Increase the RPC ping timeout from 5 seconds to 15-30 seconds, or Make the timeout configurable (e.g., via a setting or SSH config directive), or Detect high-latency connections and dynamically adjust the timeout

🤖 Generated with Claude Code

What Should Happen?

The desktop app should successfully connect to remote servers behind Azure Bastion tunnels (and similar high-latency proxy setups).

Error Messages/Logs

<details> <summary>Full ssh.log (client side)</summary>
[attach ssh.log contents]
</details><details> <summary>Full remote-server.log (server side)</summary>
Claude remote server listening on /lustrefs/shared/ali.filali/.claude/remote/rpc.sock
2026/04/16 09:28:27 [Server] New connection from: @
2026/04/16 09:28:27 [Server] RPC request: method=server.ping, id=1
2026/04/16 09:28:27 [Server] RPC response sent: id=1, hasError=false
2026/04/16 09:30:09 [Server] New connection from: @
2026/04/16 09:30:09 [Server] RPC request: method=server.ping, id=1
2026/04/16 09:30:09 [Server] RPC response sent: id=1, hasError=false
</details>

Steps to Reproduce

Set up an Azure Bastion tunnel to a remote VM: az network bastion tunnel --name <bastion> --resource-group <rg> --target-ip-address <ip> --resource-port 22 --port 1170 Configure SSH connection in the desktop app to 127.0.0.1:1170 Attempt to connect — the app shows "Installing Claude Code" / "Connecting Claude" then fails

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.110

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

Increase the RPC ping timeout to accommodate the high latency introduced by the Azure Bastion tunnel.

Guidance

  • Review the client log (~/Library/Logs/Claude/ssh.log) to confirm the ping timeout issue and the exact timing of the failure.
  • Consider increasing the RPC ping timeout to 15-30 seconds as a temporary workaround to see if it resolves the connection issue.
  • Investigate making the timeout configurable via a setting or SSH config directive for a more permanent solution.
  • Verify that the Azure Bastion tunnel's latency is the primary cause of the issue by checking the round-trip time of RPC messages.

Example

No code snippet is provided as the issue seems to be related to configuration and timing rather than code.

Notes

The issue might not be specific to Azure Bastion tunnels but could affect any high-latency proxy setups. The suggested fix should be tested in different environments to ensure its applicability.

Recommendation

Apply a workaround by increasing the RPC ping timeout to a value that accommodates the expected latency of the Azure Bastion tunnel, such as 15-30 seconds, to stabilize the connection.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING