DragonFly BSD
DragonFly users List (threaded) for 2010-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Connection reset by peer (ssh)

To: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
From: David Xu <skypexu@xxxxxxxxx>
Date: Fri, 17 Dec 2010 10:52:59 +0800

Matthew Dillon wrote:
:I sshed into dogla (the DFly laptop) as both myself and root, ran Firefox as :myself, and did various other things. I just found that the connection as :root is still up, but the one as me is not. It left this message:
:-bash-3.2$ firefox&
:[1] 89080
:-bash-3.2$ Read from remote host dogla: Connection reset by peer
:Connection to dogla closed.
:What causes this?

    If one side of a connection thinks the connection has failed and
    closes it and the other side does not and is idle, then later on
    when network connectivity is restored if the other side tries to
    send something the first side will go 'say what?' and send a RST.

    This case also occurs quite often with idle tcp connections over
    NATted network links.  NAT will timeout an idle tcp connection
    after a period of time (depends on the NAT implementation, which
    is typically part of your cable/dsl modem or wireless router).
    This can be solved by forcing TCP keepalives to occur much more often
    than they normally do by setting sysctl net.inet.tcp.keepidle
    to 75000 (75 seconds) instead of 7200000 (2 hours).  The cost of
    course is more traffic over your network link.

Matthew Dillon <dillon@backplane.com>

Note that ssh_config also supports some tunables:


David Xu

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