SSH加固

1.修改ssh默认端口 vi /etc/ssh/sshd_config  中Port;service ssh restart

2.安装denyhosts,应对暴力破解ssh.

A.直接

apt-get install denyhosts

B.下载:https://github.com/denyhosts/denyhosts,直接git clone

进行python setup.py install后查看过程

(一般的VPS 安装时会提示没有模块ipaddr,pip 安装下即可)

修改文件daemon-control中的内容:

重启应该就差不多了。然后查看 /etc/hosts.deny 文件能看到被屏蔽的IP..

3.SSH证书登录

ps:

 http://www.itbulu.com/denyhosts.html

https://www.freehao123.com/vps-ssh/

原文地址:https://www.cnblogs.com/crac/p/6218942.html