scrt连接不到centos系统的解决办法

本文来源于:https://blog.csdn.net/y125348369/article/details/6782471  如有不当,请告知删除

1、确定ssh服务有没有打开:
/etc/init.d/sshd status
没有的话打开:
/etc/init.d/sshd start

2、IP地址是否正确设定
ifconfig -a
ifconfig eth0 192.168.0.24

3、防火墙是否关闭

/etc/rc.d/init.d/iptables status

没有关闭的话关闭

/etc/rc.d/init.d/iptables stop

 

并且如果要想通过ssh远程访问,需要手动执行 service sshd start,这样sshd服务才开启。

通过chkconfig可以将sshd加入到系统服务中。

 [root@localhost ~]# chkconfig sshd on 可以再查看sshd的运行级别状态:

 [root@localhost ~]# chkconfig --list sshd

sshd 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭

以后重启之后,就可以直接通过ssh远程访问了。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值