You are not logged in.

#1 2019-04-08 01:18:19

schwim
Member
From: Western NC, US
Registered: 2015-09-29
Posts: 229
Website

Upgrade from 8 to 9, SSH dropping out routinely

Hi there everyone!

As Debian started making it hard to update 8, I happily grabbed the latest BL and installed it.  It's been zoomy except with this one issue. Both my BL 8 and 9 are virtual machines.  To ensure it's only happening on the BL 9 install, I opened 8 up at the same time and connected the filesystems on both.  9 would drop while 8 would remain connected.

I use Fuse  SSHFS for remote filesystems and remain connected to a couple servers via an SSH terminal.  With my BL based off of Deb 8, My connections would persist for the entire week(my routers reset weekly).  With the new BL, my connections routlinely drop out each day.  It isn't always both my fuse connections and SSH(they are connected to the same machine) but sometimes one or the other will drop while the other remains connected.

This can happen 10-20 times a day while I'm working on the computer.  This causes a lot of problems for me.  For one, I don't get my terminal updates via screen.  Secondly, when my Fuse filesystems drop, my open filemanagers, editor and other apps using the files will freeze, sometimes requiring an OS restart.  Third, the editor will save files to the now-empty remote filesystem's directory so my next attempt at mounting will fail due to a non-empty directory.

It's an incredible drag.  I'd love to figure out how to keep this from happening.  If that's not possible, I'd like a script that checks this connection and reestablishes it when it drops.


Schw.im! A social site with an identity crisis.

Offline

#2 2019-04-08 05:50:54

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 648

Re: Upgrade from 8 to 9, SSH dropping out routinely

^Add this option when starting connection with ssh or sftp:

$ ssh -o ServerAliveInterval=60 <usual stuff>

### i.e.

$ sftp -o ServerAliveInterval=60 <usual stuff>

On client side, this option can be globally set in $HOME/.ssh/config (see 'man ssh_config' for details) for all connections ... just add 'ServerAliveInterval=60' in this file. (Create file if it doesn't exist.)

Furthermore, check if /etc/ssh/sshd_config on the ssh server side has:

TCPKeepAlive yes

(AFAIK, this is normally default option.)

Last edited by iMBeCil (2019-04-08 05:52:08)


Postpone all your duties; if you die, you won't have to do them ..

Offline

Board footer

Powered by FluxBB