CentOS7 NetworkManaer 未运行

[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博客

  • 8
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值