
下图截取自 DRG SSH Username and Password Authentication Tag Clouds,看看有没有自己常用的密码,有的话赶快换吧。


如果对 ssh 还不放心的话可以采用下面几个简单做法来进一步增强 ssh 的安全性,不过要记住的是下面的技巧不能替代一个好的密码:
- 修改和配置 DenyUsers, AllowUsers, DenyGroups, AllowGroups 只允许相关人员登录 ssh;
- 生成 public/private key,修改 AuthorizedKeysFile,采用 ssh key 的方式登录 ssh;
- 禁止 PasswordAuthentication no;
- 禁止 root 直接登录,PermitRootLogin no;
- 修改 ssh 的默认端口 22 为其他数字(比如 2012)。