一:IP访问限制设置
vi /etc/hosts.deny
vi /etc/hosts.allow
二:变更ssh访问端口
1.Vi /etc/ssh/ssh_config
service sshd restart
/usr/sbin/sshd -p 9527
2.生产机器禁止root远程SSH登录
PermitRootLogin no
Port 9527
service sshd restart
/etc/init.d/sshd restart
3.增加新的用户执行ssh访问操作
useradd gengchong
passwd gengchong
vi /etc/hosts.deny
![](http://img.blog.itpub.net/blog/attachment/201603/17/28624388_1458196990Na84.png?x-oss-process=style/bb)
vi /etc/hosts.allow
![](http://img.blog.itpub.net/blog/attachment/201603/17/28624388_1458197051RYtr.png?x-oss-process=style/bb)
二:变更ssh访问端口
1.Vi /etc/ssh/ssh_config
![](http://img.blog.itpub.net/blog/attachment/201603/17/28624388_1458197257wnsW.png?x-oss-process=style/bb)
service sshd restart
/usr/sbin/sshd -p 9527
2.生产机器禁止root远程SSH登录
PermitRootLogin no
Port 9527
service sshd restart
/etc/init.d/sshd restart
3.增加新的用户执行ssh访问操作
useradd gengchong
passwd gengchong
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28624388/viewspace-2058794/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/28624388/viewspace-2058794/