暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

CentOS 7.5 modify the sshd port with SElinux and Firewalld Service running

原创 你好我是李白 2021-02-22
544

CentOS 7.5 modify the sshd port with SElinux and Firewalld Service running

Goal:modify the sshd service port from 22 to 1022.

1. modify the port type

-- modify the port type
# semanage port -a -t ssh_port_t -p tcp 1022

2. modify the sshd service port

port 1022

3. Restart sshd Service

# systemctl restart sshd.service

4. open firewalld port

# firewall-cmd --zone=public --add-port=22/tcp --permanent
# firewall-cmd --reload

5. display policy

# firewall-cmd --zone=public --list-ports
最后修改时间:2021-02-22 21:13:40
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论