下面的内容是我的/etc/ssh/sshd_config 的配置


#PermitRootLogin no //root无法登陆,把这一行注释掉代表root可以登陆

MaxAuthTries 5

PubkeyAuthentication yes

AuthorizedKeysFile .ssh/auth_keys

IgnoreRhosts yes

AllowUsers root jingyi lingchun jace dev andy.x  

//在这里面不写root,就是把PermitRootLogin no注释掉root也是无法登陆的。所以一定要加上root,才能解开限制!