之前虚拟机ssh连接没问题,今天竟然连不上了。
打开虚拟机 ip a 网卡ens33没有ip
root@ubuntu:/home/ww# ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536
qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever 2: ens33: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default
qlen 1000
link/ether 00:0c:29:3e:07:f2 brd ff:ff:ff:ff:ff:ff 3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
group default
link/ether 02:42:2e:7d:4f:05 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
尝试命令ifup ens33,无济于事。文章来源:https://www.toymoban.com/news/detail-474751.html
一顿如下操作也没反应。文章来源地址https://www.toymoban.com/news/detail-474751.html
systemctl stop NetworkManager
systemctl disable NetworkManager
service network restart
Failed to restart network.service: Unit network.service not found.
service network-manager restart
sudo dhclient ens33
再ip a OK了
到了这里,关于ssh连接没问题,今天竟然连不上了的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!