HOST: Virtual Environment 5.1-35
template: ubuntu 17.04
after a reboot, sshd isn't auto started on a CT. how do i enable sshd to auto run?
systemctl enable sshd
> systemctl enable sshd
Failed to execute operation: Too many levels of symbolic links
> systemctl start sshd
cat /etc/sysctl.d/pve.conf
...
fs.inotify.max_user_watches=1048576
...
tested it here and cannot reproduce this, works without problemsI tested it by creating a brand new container, using the provided/downloadable Ubuntu 16.04 template from the web gui, all default settings except I gave it a public key, and clicked dhcp.
I was able to SSH into the container ok at that point. But then I updated it (apt update ; apt upgrade -y) and then shut it down (shutdown 0). After restart (pct start 199), I wasn't able to ssh into any more. A quick pct enter 199 and then service ssh start, and I was able to ssh into the container again.
sudo nano /etc/systemd/system/network-online.target.wants/networking.service
TimeoutStartSec=5min
TimeoutStartSec=1sec
pve-manager/7.0-10/d2f465d3 (running kernel: 5.11.22-3-pve)
● 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)