返回

修改SSH端口方法

   
摘要GPT
摘要小助理暂时失联跑路啦……😜

编辑 sshd_config

nano /etc/ssh/sshd_config

例如:添加 33 端口,注释掉 22 端口

Port 33

退出保存

  • crl+x 退出
  • y 确定保存
  • 回车/ 重启 reboot

查看变更状态

systemctl status sshd

新端口使用后,发现注释后依然可以连接!直接删掉 port 22

知识共享许可证 CC BY-NC-SA 4.0
最后更新于 2024-07-17 18:28
使用 Hugo 构建
主题 hugo-magic小洋葱 魔改 由 Jimmy 设计
Written by Human, Not by AI