09-11-2019, 11:33 PM
(09-11-2019, 06:59 PM)Hidden Refuge Wrote: A bit of research revealed a bug in Ubuntu 16.04. An important folder where the SSH server will store its PID file is not being created during the upgrade. The solution is quite simple!Great support, many thanks @"Hidden Refuge" and much appreciated. As per usual all of us are learning at the same time as well.
Code: (Select All)apt-get --purge remove openssh-server -y && apt-get --purge autoremove -y
apt-get install openssh-server -y
mkdir /var/run/sshd
chmod 755 /var/run/sshd
After that the SSH service started normally again. Because I fully reinstalled the OpenSSH server it was necessary to edit /etc/ssh/sshd_config and change "PermitRootLogin prohibit-password" to "PermitRootLogin yes". Otherwise you can't login as root via SSH unless start using SSH public key authetication. After changing this simply restart the SSH server process and you're done.
I have a question. Is this the same bug that Rehan came across at VPS 9 in this support thread?
https://post4vps.com/Thread-Connection-Refused
Will your solution work with VPS 9 update of Ubuntu as well?