09-11-2019, 01:30 PM
@Khadeer143 I've referred the issue to @Dynamo. What you're asking us to do you can do yourself too, but I've asked Dynamo to check whether there are other issues that we may have missed about the VPS.
root@server:~# apt-get upgrade -y
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
[...]
Processing triggers for initramfs-tools (0.122ubuntu8.14) ...
Errors were encountered while processing:
openssh-server
Missing privilege separation directory: /var/run/sshd
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
(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.
if [ ! -d /var/run/sshd ]; then
mkdir /var/run/sshd
chmod 0755 /var/run/sshd
fi