Dev Collection
HomeGitHubAI Web
  • ReadMe
  • How to use patch-package
  • Add GCC for node-canvas in Centos7.x
  • Create Server-Sent Events in Nextjs
  • TimeZone in Jest
  • Common Git Commit Message Types
  • Node v8 memory leak
  • minIO + picGO self-hosted image hosting service
  • Preventing SSH remote brute-force attacks
  • Ubuntu安装Netflix-Proxy
  • SNIProxy+Dnsmasq实现Netflix-Proxy
  • Simultaneously Pushing a Repository to Two Different Remotes: GitHub and GitLab
  • Typescript中的类型谓词
  • Mac Sonoma 无法安装 Charles 的解决办法
  • Git 多账号管理:在不同文件夹区分Git账号
  • localStorage VS IndexedDB
  • Chrome Extension 开发指南
Powered by GitBook
On this page

Preventing SSH remote brute-force attacks

防止ssh远程暴力攻击

方法一:修改远程登录端口

修改/etc/ssh/sshd_config文件中的Port 将前方的#注释删除,并将22修改为你想要使用远程登录的端口,例如54321。

vi /etc/ssh/sshd_config

删除 Port 22 前的注释,并且修改为 54321:

#Port 22
Port 54321

保存退出, 按ESC, 输入:

:wq

最最重要的一步,千万不要忘记修改防火墙端口,否则重启ssh服务之后将无法连接!!

# tcp 端口
firewall-cmd --permanent --add-port=54321/tcp
# udp 端口
firewall-cmd --permanent --add-port=54321/udp
# 重载防火墙
firewall-cmd --reload

重启 ssh 服务

systemctl restart sshd

方法二:限制登录IP

TODO

方法三:使用非root用户登录

TODO

PreviousminIO + picGO self-hosted image hosting serviceNextUbuntu安装Netflix-Proxy

Last updated 1 year ago