[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Bulk] Re: ssh error - Write failed: Broken pipe



On 23/05/12 22:45, Gary Dale wrote:
> On 23/05/12 04:53 PM, elbbit wrote:
>> On your server put this line in your sshd_config after "Port 22":
>>
>> Port 443
>>
>> Do a "service ssh restart" or "/etc/init.d/ssh restart".  Connect using:
>>
>> ssh -p 443 user@host
>>
> That has the same issue as the keepalive - it presumes that the
> connection is at fault when the problem only seems to happen when I'm
> doing large amounts of data movement on the server (NOT over the
> connection).

Are you saying that if you log in by SSH then issue a command like

cp large_file4gb large_copy4gb

that even though the command produces no output you then get broken
pipe?  If so the connection is likely being terminated because it's idle
(check your internet provider).  The keepalive should prevent this.

If you log in and do a

ls -R /

do you get the output or broken pipe?  If you get broken pipe before the
command completes this again suggests (to me) that you are subject to
packet inspection.

For me, putting sshd on different ports helps here like ports 22, 81,
443, 2022, 3389 and 20222.  Some 3G providers here (UK) block port 22
altogether. One works best on port 81, on others 443 seems to work most
of the time.  Some network admins prefer to administer Windows boxes and
(thus) leave port 3389 untouched. YMMV.

Either way, in my experience broken pipe is usually a network problem.


-- 
elbbit@gmail.com


Reply to: