从 ubuntu 14 升级到 ubuntu 16 后sshd 服务有问题。连接时间太长,有时连接失败等。当我尝试重新启动 sshd 服务时,大多数时候我都会收到一条错误消息:
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
当我检查 systemctl 状态时,错误是:
myuser@myserver:~$ systemctl status sshd.service
Failed to get properties: Connection timed out
问题似乎不仅仅出在 sshd 服务上,因为其他服务也存在同样的问题。例如,当我在服务器上安装或卸载任何东西时,我得到:
Failed to execute operation: Connection timed out