Fork me on Gitee

CentOS8开启SSH服务

1、首先安装SSH服务

yum install openssh-server

2、启动SSH服务

systemctl start sshd

3、查看SSH服务状态

systemctl status sshd

4、查看端口

netstat -antp | grep sshd

5、加入开机启动

systemctl enable sshd

 

6.SSH其他常用命令

#启动sshd服务
systemctl start sshd

#停止sshd服务
systemctl stop sshd

#重启sshd服务
systemctl restart sshd

#查看sshd服务的状态
systemctl status sshd

#sshd服务开机启动
systemctl enable sshd

#sshd服务禁止开机启动
systemctl disable sshd

#锁定sshd服务
systemctl mask sshd

#解锁sshd服务
systemctl unmask sshd

#重新加载sshd服务的配置文件
systemctl reload sshd

  

posted @ 2022-01-24 22:18  JoePotter  阅读(886)  评论(0编辑  收藏  举报
``