Almost a Blog

Month: March, 2007

SSH Connection Reset By Peer

If ever you see the following when using SSH and it all seems inexplicable.
Read from remote host http://www.somehwhere.com: Connection reset by peer
There may be a quick cure (caveat, your mileage may vary). Some routers, i.e. Linksys WRT54G will close a connecting that does not appear busy. So far I have found that if I add
ServerAliveInterval = 300
ServerAliveCountMax = 300
to my /etc/ssh/ssh_config file then everything is fine.
Basically we are send a message to the server every “ServerAliveInterval” seconds and if the client has not had a response after “ServerAliveCountMax” messages then the connection will disconnect. This makes the connection look active to hardware that thinks it’s doing you a favour by disconnecting idle connections.
see “man ssh_config” for more details.
I have also noticed the following method but have not tried it
echo 300 > /proc/sys/net/ipv4/tcp_keepalive_time

Packard Bell Store and Save

Their 400Gb 3500 model works a treat under Debian stable. It comes up as a scsi device when switched on. To see the device use dmesg and look for something like the following output.
sd 13:0:0:0: Attached scsi disk sdc
sd 13:0:0:0: Attached scsi generic sg3 type 0