I decided to dust off my Beaglebone Black Rev.C and figured before I do much of anything, I should get everything up to date. I created an SD card with the new Debian 8.3 image and installed it. No problem.
Using TeraTerm from my Windows 8.1 machine to ssh into the BBB kept ending badly with me apparently getting booted off by the ssh-server. Ugh. So, I fire up a Kali Linux VM and ssh in from there. Pretty much the same. Edit /etc/ssh/ssh_config
and added ServerAliveInterval 60
. Still getting dropped, but ran apt-get update
to completion without getting dropped. Next, I tried apt-get upgrade
and it chugged along for quite a long time and then dropped me.
It's been some time and there seems to be no traffic on the LAN that would indicate that apt-get upgrade
is still doing anything, but /var/lib/dpkg/
is locked. The process is probably waiting for input from a shell that vaporized.
The question(s):
- Is there a way to resolve this politely or should I just reboot?
- What's to stop this from repeating ad nauseam? How can I keep my ssh session alive for sure for sure?
ServerAliveInterval
is set on the client, e.g.ssh -o ServerAliveInterval=5 -o ServerAliveCountMax=1 myuser@myserver
. This is the number of seconds the cliet waits before sending a keep alive packet. Also mentioned here: http://unix.stackexchange.com/questions/3026/what-do-the-options-serveraliveinterval-and-clientaliveinterval-in-sshd-conf – mnille Apr 22 '16 at 05:05ServerAliveCountMax => Sets the number of server alive messages (see below) which may be sent without ssh(1) receiving any messages back from the server. If this threshold is reached while server alive messages are being sent, ssh will disconnect from the server, terminating the session....The default value is 3. If, for example, ServerAliveInterval (see below) is set to 15 and ServerAliveCountMax is left at the default, if the server becomes unresponsive, ssh will disconnect after approximately 45 seconds.
– mnille Apr 22 '16 at 05:43