nano /etc/ssh/sshd_config
例如:添加 33 端口,注释掉 22 端口
Port 33
crl+x
y
systemctl status sshd
新端口使用后,发现注释后依然可以连接!直接删掉 port 22