尝试修复我的 ubuntu 服务器没有任何互联网时收到大量错误消息。最后,我发现这是由于网关指向错误的IP所致。必须将 /etc/network/interfaces 中的网关切换到 xxx.xxx.x.193
但在此之前,我正在此处阅读答案并按照其命令查看它是否可以解析服务器上的互联网。
https://askubuntu.com/questions/767574/no-network-after-upgrade-to-16-04/767944#767944
$ sudo systemctl enable systemd-networkd
$ sudo systemctl enable systemd-resolved
$ sudo systemctl start systemd-resolved
$ sudo rm /etc/resolv.conf
$ sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
$ sudo vi /etc/systemd/network/20-dhcp.network
Run Code Online (Sandbox Code Playgroud)
在我这样做并重新启动后,收到各种错误消息。我想可能与 DHCP 设置为自动有关。但不确定。有什么修复建议吗?这是我在启动消息中收到的错误。
Mar 22 20:04:42 ubuntu sshd[1413]: Missing privilege separation directory: /var/run/sshd
Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Control process exited, code=exited status=255
Mar 22 20:04:42 ubuntu systemd[1]: Failed to start OpenBSD Secure Shell server.
Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Unit …Run Code Online (Sandbox Code Playgroud)