/etc/hosts.allow 和 /etc/hosts.deny
#cat /etc/hosts.allow
sshd,sshd2:10.10.1.*:allow
#cat /etc/hosts.deny
#sshd:ALL
/etc/ssh/sshd_config
# vi /etc/ssh/sshd_config
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
重启
# service sshd restart
问题:root登陆不了
#vi /etc/ssh/sshd_config
PermitRootLogin no 改为 PermitRootLogin yes
通过修改sshd_config文件中的PermitRootLogin参数,解决root用户无法登录的问题,并解释了/etc/hosts.allow和/etc/hosts.deny文件的作用。
1199

被折叠的 条评论
为什么被折叠?



