When I log in a remote computer by ssh from my home and if I keep it inactive for a while (for example, 10 mins), I often was kicked out with the message, for example:
=====================
Read from remote host jasper-clued0.fnal.gov: Connection reset by peer
====================
This happened probably because a firewall or other packet filtering device (such as your router) drops idle connections after a certain period of time.
------------------------------------------
A solution based on the ssh server side can be found here (Dugan provided me with this solution):
http://www.brandonhutchinson.com/OpenSSH_ClientAliveInterval.html
Simply speaking, the solution is add a line
ClientAliveInterval 300
in the file:
/etc/ssh/sshd_config
and reload the sshd server configuration with
/sbin/service sshd reload
--------------------------------------
Another solution based on client side provided by my colleage Horst at Fermilab is: to add
echo 300 > /proc/sys/net/ipv4/tcp_keepalive_time
into the file /etc/rc.local
Monday, August 13, 2007
Network: a problem about 'Connection reset by peer'
Labels:
clientAliveInterval,
Connection reset by peer,
firewall,
idle,
inactive,
network,
openssh,
rc.local,
remote,
server,
solution,
ssh,
sshd,
sshd_config,
tcp_keepalive_time,
wireless
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment