原文地址: https://blog.tinned-software.net/change-ssh-port-in-centos-with-selinux/
Since version 4 of CentOS, SELinux is providing an additional layer of security to the Linux distribution. CentOS describes it like this: “Security-Enhanced Linux (SELinux) is a mandatory access control (MAC) security mechanism implemented in the kernel.” In other words, it controls with rules what a user or process is allowed to do.
从 CentOS 4 开始,SELinux 针对 Linux 发行版提供了一个额外的安全层。CentOS 描述其为:Security-Enhanced Linux(SELinux)是一种在内核中实现的强制访问控制(MAC)安全机制。换句话说,它通过规则控制用户或进程能都被允许做什么。
In my experience, keeping SSH on the default port 22 is a bad idea, as you will notice a lot of login attempts shortly after your server goes online. One of the actions (of course not the only one) to secure the server is to just change this port.
根据我的经验,让 SSH 服务使用默认的 22 端口是一个糟糕的主意,因为在你的服务器上线后不久你就会注意到非常多的尝试登录的记录。其中一种保护服务器安全的方式就是更换默认的 22 端口(当然你不止这一种方式)。