Ubuntu 20.04.3 desktop (Cinnamon) - SSH disconnects when user logs off the desktop!

Bo Berglund bo.berglund at gmail.com
Sat Jan 22 16:07:01 UTC 2022


On Sat, 22 Jan 2022 12:17:24 +0100, Bo Berglund <bo.berglund at gmail.com> wrote:

>On Sat, 22 Jan 2022 10:22:54 +1100, Karl Auer <kauer at biplane.com.au> wrote:
>
>>>  the SSH session (via PuTTY) just disconnects mid way in a file edit
>>> or other activity! At the same time I hear from the box how the data
>>> drive is powered off and the heads parked.
>>
>>That sounds a bit as if the remote is going to sleep.
>>
>>> After this it is not possible to connect by SSH anymore
>>
>>That still sounds as if the remote has gone to sleep.
>>
>>Even if you don't think that is the case, I suggest you *prove* it is
>>not the case before investigating more esoteric explanations.
>
>I think too that this is what happens, how can I prevent it?
>
>This is a unit that seldom will have a user logged on to the hardware screen
>(there will be no monitor attached on the final deployment).
>
>The only way to use it will be via SSH or VNC and both require the system to be
>running to get to it. It is much like a server system, but I installed Desktop
>in case I had to do some admin work on it which requires some web browsing and
>the like.
>
>I found an AskUbuntu question that went without a solution:
>https://askubuntu.com/questions/1281232/how-to-disable-sleep-at-the-login-screen-if-no-logged-in-user
>

Now I found a forum thread that offers a solution to the problem by
reconfiguring the lid handling. Obviously my computer does not have a lid but I
tried it anyway.
https://forums.linuxmint.com/viewtopic.php?t=273378

However in my case it did not work when I did this:

sudo nano /etc/systemd/logind.conf
Set:
HandleLidSwitch=ignore


sudo nano /etc/UPower/UPower.conf
Set:
IgnoreLid=true

sudo reboot

After the reboot I can reach the system with PuTTY but:

If I connect with PuTTY and start navigating in the system, then after about 2-3
minutes the connection just dies at the same time that there is a disk drive
beep when it stops...

So the above "solution" does not apply here.

I have looked through all of the settings apps I can find from the desktop menu
and set the following:

Power Management:
-----------------
Turn off the scrteen when inactive for = Never
Suspend when inactive for = Never
When power button is pressed = Do nothing

System Settings:
----------------
Screensaver Delay before starting the screensaver = Never
Lock the computer when put to sleep = Disabled
Lock the computer after the screensaved starts = Disabled

If I go to the physical display and log in to the Cinnamon desktop and then
leave the computer there, then this does not happen.

But on a remote location where this will be running it is impossible to have to
go to the physical monitor and log in!!!!!

Is there really nothing that can be done?
Is there no service that can be disabled?
Are the shutdowns logged anywhere?


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list