Chinaunix首页 | 论坛 | 博客
  • 博客访问: 51678
  • 博文数量: 8
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 75
  • 用 户 组: 普通用户
  • 注册时间: 2013-05-11 20:04
文章分类
文章存档

2017年(2)

2016年(3)

2014年(2)

2013年(1)

我的朋友

分类: 系统运维

2016-05-25 14:57:27

安装完Centos 6.3之后,发现ssh服务默认没有打开,又想远程访问,需要手动执行services sshd start (当然,关闭是services sshd stop),这样ssh服务才能开启。

想要随机启动的话,可以使用chkconfig(该命令主要用来查询或修改系统服务的运行级信息。

如下,查询时用chkconfig


点击(此处)折叠或打开

  1. [root@localhost jwstudy]# chkconfig | grep sshd
  2. sshd 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
随机启动可以使用如下命令

点击(此处)折叠或打开

  1. [root@localhost jwstudy]# chkconfig sshd on
  2. [root@localhost jwstudy]# chkconfig | grep sshd
  3. sshd 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭

关闭随机启动可以使用如下命令

点击(此处)折叠或打开

  1. [root@localhost jwstudy]# chkconfig sshd off
  2. [root@localhost jwstudy]# chkconfig | grep sshd
  3. sshd 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭



阅读(5596) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~