Score:0

Undead SSH services after restarting Ubuntu 22.04 on LXC machine

mo flag
Nux

Some services SSH die after restart on Ubuntu... Or so they say. The status is "inactive (dead)", but you can connect to the server. What could be the problem here? What can one check?

Some factors that might be important:

  • Those are virtual servers on a Proxmox 8 host (ZFS/LXC).
  • Things worked fine on CentOS with mostly the same things running under the hood (same types of services, same physical infrastructure).
  • Recently migrated to Ubuntu 22.04.2 LTS (reinstalled services on new virtual machines).
  • When SSH is "inactive" I can connect to it.
  • When SSH is "inactive" it is not logging anything. E.g. this is empty: journalctl -u ssh --since yesterday
  • When SSH is "inactive" it is unstable. E.g. scp gets disconnected randomly when running a script (a script that used to work fine and was very stable before migration to Ubuntu).

log for checking servers

Here is a loop that I use to check services:

# check ssh service status
# (xargs = trim)
for someServer in ${serverList[@]}
do
 connectionString=`getConnectionString "$someServer"`
 status=`ssh $connectionString "service ssh status | grep active" | xargs`
 printf "%15s: $status\n" $someServer
done

Full status info:

# service ssh status
○ ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:sshd(8)
             man:sshd_config(5)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.