client_loop: send disconnect: Broken pipe Linux Origin: Platform & cloud Last updated 14 Oct 2026

client_loop: send disconnect: Broken pipe (SSH session drops when idle)

The SSH connection was cut — usually an idle timeout on a NAT router, firewall or the server, sometimes a network change.

Exact message you may see client_loop: send disconnect: Broken pipeWrite failed: Broken pipepacket_write_wait: Connection to port 22: Broken pipeConnection reset by peer
Seen on: Linux

Meaning

NAT devices and firewalls drop idle TCP connections. Without keep-alives, the next keystroke finds the connection gone. Laptops sleeping or switching Wi-Fi cause the same.

Common causes

  • Idle connection dropped by NAT/firewall
  • Server ClientAliveInterval disconnects idle clients
  • Network change or laptop sleep
  • Server restarted/sshd killed

⚡ Quick fix

  1. Enable keep-alives: ServerAliveInterval 60 in ~/.ssh/config
  2. Use tmux/screen so work survives disconnects
  3. Consider mosh on unreliable networks

Detailed fix by platform

Shell

  1. bash
    # ~/.ssh/config
    Host *
      ServerAliveInterval 60
      ServerAliveCountMax 3

How to diagnose

  1. Timing — After how long idle?
  2. Network — Wi-Fi/VPN changes?
  3. Server — ClientAliveInterval in sshd_config

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

0x80070035 — 0x80070035: The network path was not found (System error 53) (Windows)0x800700350x80072EE7 — Error 0x80072EE7 (Windows Update / Microsoft Store: server name could not be resolved) (Windows)0x80072EE70x8024402C — Windows Update error 0x8024402C (cannot connect to update server) (Windows)0x8024402C14 UNAVAILABLE — gRPC Error: 14 UNAVAILABLE: No connection established / failed to connect to all addresses (API)14 UNAVAILABLEauth/network-request-failed — Firebase Auth: auth/network-request-failed — A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred (Authentication)auth/network-request-…CDN: trunk URL couldn't be downloaded — [!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/... (iOS)CDN: trunk URL couldn…Download failed — WordPress: Download failed. A valid URL was not provided / cURL error 60 / Could not resolve host: downloads.wordpress.org (WordPress)Download failedECONNRESET — Error: socket hang up / read ECONNRESET (API)ECONNRESETclient_lo…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.