CentOS7 NetworkManaer 未运行
[root@localhost ~]# nmtuiNetworkManaer 未运行。但是ping外网是没有问题的。输入以下命令:yum install NetworkManager-tuiyum-config-manager --enablesystemctl start NetworkManager再次输入nmtui,就可以发现进入设置窗口了后来发现ssh提示连接超时,用虚拟ping主机能连接
·
[root@localhost ~]# nmtui
NetworkManaer 未运行。
但是ping外网是没有问题的。
输入以下命令:
yum install NetworkManager-tui
yum-config-manager --enable
systemctl start NetworkManager
再次输入nmtui,就可以发现进入设置窗口了
后来发现ssh提示连接超时,用虚拟ping主机能连接,而主机无法访问虚拟机,修改 /etc/ssh/ 目录下的sshd服务配置文件 sshd_config
1 # $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $
2
3 # This is the sshd server system-wide configuration file. See
4 # sshd_config(5) for more information.
5
6 # This sshd was compiled with PATH=/usr/local/bin:/usr/bin
7
8 # The strategy used for options in the default sshd_config shipped with
9 # OpenSSH is to specify options with their default value where
10 # possible, but leave them commented. Uncommented options override the
11 # default value.
12
13 # If you want to change the port on a SELinux system, you have to tell
14 # SELinux about this change.
15 # semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
16 #
17 Port 22 #开启22端口
18 #AddressFamily any
19 #ListenAddress 0.0.0.0
20 #ListenAddress ::
保存后,再次连接,连接成功。
参考:虚拟机下CentOS7开启SSH连接_dh2580-CSDN博客_centos7开启ssh
参考:“Linux打开nmtui出现NetworkManager is not running怎么办_鸭腿面好吃的博客-CSDN博客”
更多推荐
已为社区贡献2条内容
所有评论(0)