ssh: broken pipe, write failed

It is driving me nuts ... using iMac, OS LION 10.7.3 and ssh (from Terminal, iTerm2 or SecureCRT).


When connecting to a remote host with "ssh user@remotehost" the connection is terminated after exactly 9000 seconds.

Always with the same message: Broken Pipe, Write failed.


And it doesn't matter if I am editing a file remotely, ping start a while loop etc: the session is terminated.

Recently I started two windows: one with my 'work' window, one with a 'while loop' to count the seconds until failure.


I searched the net and a number of forums and used a variety of options in /etc/ssh_config, currently set at:


ServerAliveInterval 20

ServerAliveCountMax 3


But to no avail.


Also "ssh -o TCPKeepAlive=no -o ServerAliveInterval=15" doesn't work.


The behaviour is consistent: I am using ssh to at least 5 different sites: all break after 9000 seconds.


Is there anyone ot ther who can provide a solution for this ?


Thanks a lot !


NB: this iMac was originally a Leopard, then a Snow Leopard and now a Lion and recently upgraded by Apple with a 500GB SSD Drive.

iMac, Mac OS X (10.7.3)

Posted on Apr 5, 2012 4:49 PM

Reply
3 replies

Apr 5, 2012 5:08 PM in response to kpkes

You should probably repost in either the Lion forum or even better a developers forum. Chances are it's nothing to do with you iMac it probably has to do with the server you are connecting to, an incorrect command being used, an ISP issue or a perrmissions issue outside your computer.


When I use SSH to log into a remote system it works flawlessly.

Apr 5, 2012 5:21 PM in response to rkaufmann87

Thanks R. I just did and posted in the dev forum.


Re your answer:


1. what is wrong with my commands, when using 'ssh host -l user' or 'ssh user@host' or 'ssh -o options user@host'


2. I am accessing 5 different servers: in the US, Germany, Holland and Norway: all behave the same.

what permissions are you referring to ?


ISP suspect ? Maybe and hard to tell. Are there setting in a modem that might cause this ?

Apr 5, 2012 5:27 PM in response to kpkes

I'm not really a developer and am only just learning UNIX/Linux so my guess on the permissions is somthing the administrator of the server you are accessing has set.


Regarding the command again I'd check with the server administrator and see if that is the correct command. When I typed in:


ssh -o options user@host


I get:


command-line: line 0: Bad configuration option: options

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

ssh: broken pipe, write failed

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.