arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connection refused
#12
It turned out to be exactly as I said before. There is a normal SSH emergency access option available and it is called "Serial Console" in Virtualizor. This "Serial Console" doesn't require a Java plugin or something similar/different. You create a normal session that is valid for an hour and then you get SSH login details. Exactly just like with the SolusVM emergency SSH feature.

I created such a session and could log into the VPS to run diagnostics:
- Network: the network adapters are configured properly and connections to the Internet are working (tested with "ip addr" and "apt-get update").
- Firewall: the firewall is at the OpenVZ default configuration which means it is fully open and blocks no connection.
- SSH: the OpenSSH server was not running and couldn't be started due to errors. Unfortunately the journalctl entries were not really helpful for debugging.

I performed a update of the OS and packages and was instantly greeted with a error message about packages being hold back. I ran the command in the error message and it performed 99% of all hold back updates. Only the OpenSSH server failed once again to update.
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

I tried reinstalling the package but that resulted in the same issue. I checked syslog to find these errors:
Missing privilege separation directory: /var/run/sshd

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!

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.

As far as I could see your other services (whatever all they may be) seemed to be running. Apache was running for example. To be honest the way the VPS looks like it's just a totally fresh Ubuntu 16.04 installation that was about to be updated and failed because of that bug with the openssh-server package. Server is up to date now and running.
[Image: zHHqO5Q.png]
lockThread Closed 


Messages In This Thread
Connection refused - by Khadeer143 - 09-10-2019, 01:40 AM
RE: Connection refused - by Mashiro - 09-10-2019, 04:52 AM
RE: Connection refused - by tiwil - 09-10-2019, 12:53 PM
RE: Connection refused - by Khadeer143 - 09-10-2019, 01:47 PM
RE: Connection refused - by chanalku91 - 09-10-2019, 01:51 PM
RE: Connection refused - by Manal - 09-10-2019, 03:29 PM
RE: Connection refused - by Mashiro - 09-10-2019, 03:56 PM
RE: Connection refused - by Khadeer143 - 09-11-2019, 01:31 AM
RE: Connection refused - by Mashiro - 09-11-2019, 04:45 AM
RE: Connection refused - by Manal - 09-11-2019, 12:49 PM
RE: Connection refused - by deanhills - 09-11-2019, 01:30 PM
RE: Connection refused - by Mashiro - 09-11-2019, 06:59 PM
RE: Connection refused - by deanhills - 09-11-2019, 11:33 PM
RE: Connection refused - by Khadeer143 - 09-11-2019, 07:56 PM
RE: Connection refused - by Mashiro - 09-12-2019, 04:41 AM
RE: Connection refused - by humanpuff69 - 09-13-2019, 02:37 AM
RE: Connection refused - by deanhills - 09-13-2019, 03:19 AM

Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
3,621
01-25-2019, 06:05 AM
Last Post: deanhills

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting