Skip to content

Instantly share code, notes, and snippets.

@caok
Last active May 31, 2016 08:06
Show Gist options
  • Save caok/3269dc97258576d2688a to your computer and use it in GitHub Desktop.
Save caok/3269dc97258576d2688a to your computer and use it in GitHub Desktop.
关闭SSH传统密码登陆方式

如果登陆失败,请检查ssh配置文件(/etc/ssh/sshd_config)中的PubkeyAuthentication是否为yes。

如果验证成功的话就可以关闭密码登陆方式了,编辑/etc/ssh/sshd_config,将PasswordAuthentication改为no,

ChallengeResponseAuthentication改为no,不过需要重启sshd(service sshd restart)后才能生效。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment