SSH is suddenly not working anymore: "Write Failed:Broken Pipe"
This looks like a network problem.
Enquire if some network equipment has changed or has been reconfigured. Tell your network administrator that you're having trouble ssh'ing in, there may be a misconfiguration in a firewall. Try logging in from other machines or to other machines to improve the diagnosis.
One possible cause of these symptoms is an IP address conflict. Check where the client and the server are getting their IP address. If you keep ping server.example.com
running, does it help make the connection last longer? If so, you have an IP address conflict. (The ping
helps because it keeps telling the routers along the way to route the IP packets to your machine — but you'll still lose the connection if the other machine sends an ARP reply before you.) If this is the problem, you need to fix it: arrange for one of the machines that are using the same address to use a different address.
Also check the routing table on your machine. Make sure that the packets to the server are routed to the proper interface. (While a bad routing table would normally make the connection not work at all, there is an edge case where the symptoms are the ones you describe: if you obtain an address with DHCP and the DHCP server is also the server you're contacting — the address of the DHCP server will be routed to the desired interface until your ARP cache expires.)
This could be due to packet loss. A tool like mtr
could help you diagnose which one of the hosts in the route is causing problems. Here you'll find the instructions to install it on Mac OS X.