cnetos ssh相关命令
启动、关闭、重启
# 启动
systemctl start sshd.service
# 关闭
systemctl stop sshd.service
# 重启
systemctl restart sshd.service
# 开机自启动
systemctl enable sshd.service
# 查看firewall服务状态
systemctl status firewalld
# 查看状态
systemctl status sshd.service
修改端口
# 修改/etc/ssh/sshd_config文件里的 Port 22
vim /etc/ssh/sshd_config
# 修改后重启ssh生效
systemctl restart sshd.service
版权声明:
作者:白纸画
链接:https://www.fanyicloud.cn/article-57.fan
来源:白纸画的博客
文章版权归作者所有,未经允许请勿转载。

全部评论