Skip to content

Commit

Permalink
更新修改ssh端口号的方法
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 25, 2019
1 parent bcede43 commit 3460d9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CentOS/修改ssh端口号的方法.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ grep SELINUX=disabled /etc/selinux/config
setenforce 0
```


### 修改防火墙

```bash
Expand All @@ -72,7 +71,7 @@ setenforce 0
firewall-cmd --zone=public --add-port=2211/tcp --permanent

# 查看2211端口打开情况
firewall-cmd --query-port=2211/tcp
firewall-cmd --zone=public --query-port=2211/tcp
```

重启iptables
Expand All @@ -83,8 +82,9 @@ systemctl start iptables
systemctl status iptables
```

重启sshd
重启 ssh 查看状态

```bash
systemctl restart sshd.service
systemctl status sshd
```

0 comments on commit 3460d9a

Please sign in to comment.