After upgrading from ubuntu 14 to ubuntu 16 sshd service is having problems. It keeps to long to connect, sometimes fails to connect etc. When i try to restart sshd service most of the times i get an error message:
myuser@myserver:~$ sudo service sshd restart
Failed to retrieve unit: Connection timed out
Failed to restart sshd.service: Connection timed out
See system logs and 'systemctl status sshd.service' for details
When i check systemctl status the error is:
myuser@myserver:~$ systemctl status sshd.service
Failed to get properties: Connection timed out
It seems like the problem is not only for the sshd service because it does the same thing also for other services. For example when i am installing or uninstalling anything from the server i get:
Failed to execute operation: Connection timed out