温欣爸比

  • 主页
  • Alfred Workflow
  • 《Vim 练级手册》
  • 常用命令
  • 代码笔记
  • 合辑
  • 在线工具
所有文章 友链 关于我

温欣爸比

  • 主页
  • Alfred Workflow
  • 《Vim 练级手册》
  • 常用命令
  • 代码笔记
  • 合辑
  • 在线工具

Linux CentOS 各个版本启动SSHD服务命令

2017-08-22

本篇介绍如何在 CentOS 系统中怎样启动sshd服务,如何开机自启

命令概况

CentOS < 7.x

1
2
service command     # 使用service命令做start|stop|restart sshd
chkconfig command # turn on or off 机器自启sshd

CentOS >= 7.x

1
systemctl command # 管理 start|stop|start 自启sshd

CentOS < 7.x

chkconfig

1
2
3
$ chkconfig sshd on     # 开机自启sshd
$ chkconfig sshd off # 开机关闭自启sshd
$ chkconfig --list sshd # 查看每个运行级别类型中服务的当前状态

service

1
2
3
$ service sshd start | stop | restart
or
$ /etc/init.d/sshd start | stop | restart

CentOS >= 7.x

1
2
3
4
5
6
7
$ systemctl enable sshd.service     # 开机自启sshd
$ systemctl disable sshd.service # 开机关闭自启sshd
$ systemctl start sshd.service # 启动sshd
$ systemctl restart sshd.service # 重启
$ systemctl stop sshd.service # 停止
$ systemctl reload sshd.service # 重新加载
$ systemctl status sshd.service # 查看启动状态
最近更新
Alfred Workflow 命令行帮助工具
最近热读
Go 判断数组中是否包含某个 item
Vim 高级功能 vimgrep 全局搜索文件
办理北京工作居住证的一些细节
Go 语法错误:Non-declaration statement outside function body
Mac 电脑查看字体文件位置
扫码关注公众号,或搜索公众号“温欣爸比” 及时获取我的最新文章
赏

谢谢你请我喝咖啡

支付宝
微信
  • linux
Vim 基础命令
Linux 远程文件传输 SFTP 和 SCP
  1. 1. 命令概况
  2. 2. CentOS < 7.x
    1. 2.1. chkconfig
    2. 2.2. service
  3. 3. CentOS >= 7.x
© 2017 - 2022 温欣爸比 京ICP备15062634号 总访问量3226次 访客数3178人次 本文总阅读量4次
Hexo Theme Yilia by Litten
  • 所有文章
  • 友链
  • 关于我

tag:

  • python
  • flask
  • javascript
  • docker
  • 工具
  • openresty
  • 微信
  • java
  • hexo
  • 杂谈
  • vim
  • git
  • mysql
  • http
  • linux
  • mac
  • tmux
  • ssh
  • 算法
  • 开发
  • node
  • 杂文
  • jinja2
  • maven
  • spring
  • 北京
  • 生活
  • springboot
  • react
  • shell
  • graphql
  • iterm
  • expect
  • nginx
  • sqlalchemy
  • html
  • electron
  • vagrant
  • elastic
  • 宝贝
  • ansible
  • css
  • jquery
  • go
  • markdown
  • awk
  • redis
  • leetcode
  • zsh
  • 漫威
  • ssr
  • android
  • ffmpeg
  • chrome
  • vmware
  • youtube
  • windows
  • jupyter
  • excel
  • jq
  • Mac
  • Homebrew
  • mongo
  • py2
  • HomeBrew
  • movie
  • nodejs

    缺失模块。
    1、请确保node版本大于6.2
    2、在博客根目录(注意不是yilia根目录)执行以下命令:
    npm i hexo-generator-json-content --save

    3、在根目录_config.yml里添加配置:

      jsonContent:
        meta: false
        pages: false
        posts:
          title: true
          date: true
          path: true
          text: false
          raw: false
          content: false
          slug: false
          updated: false
          comments: false
          link: false
          permalink: false
          excerpt: false
          categories: false
          tags: true
    

  • Guru99
每天看书
每天背单词
每天一篇
写写代码
听听周杰伦
爱爱老婆