linux ssh2

 /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

  

猜你喜欢

转载自kettas.iteye.com/blog/2171610