内容简介:翻译自:https://stackoverflow.com/questions/4241197/how-to-disable-password-authentication-for-every-users-except-several
我想在标题中分享我的问题答案,我很快就找不到.
有很多主题如何禁用密码身份验证:
UsePam yes # it will not be used ChallengeResponseAuthentication no PasswordAuthentication no kbdInteractiveAutentication no
但没有主题如何为特定用户启用:
Match User myuser
PasswordAuthentication yes
KbdInteractiveAutentication yes
测试sshd配置的有用命令是:
sshd -T -C user=myuser,host=127.1,addr=127.1
请注意,“127.1”不适用于每个系统,因此您可能需要在此处粘贴127.0.0.1.
如果不是专门的密码验证,你可以强制使用pam_access.so并让/etc/security/access.conf看起来像这样:
+ : myuser : <ip/net here or ALL> - : ALL : ALL
翻译自:https://stackoverflow.com/questions/4241197/how-to-disable-password-authentication-for-every-users-except-several
以上所述就是小编给大家介绍的《openssh – 如何为除多个用户之外的所有用户禁用密码验证》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- 用户浏览器如果禁用 JavaScript,谷歌将不再允许其登录
- 如何临时或永久地禁用SELinux
- iphone – 移动CALayers时禁用动画
- 当浏览器全面禁用三方 Cookie
- Bootstrap禁用响应式布局的实现方法
- 如何绕过PHP中被禁用的函数
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Hit Refresh
Satya Nadella、Greg Shaw / HarperBusiness / 2017-9-26 / USD 20.37
Hit Refresh is about individual change, about the transformation happening inside of Microsoft and the technology that will soon impact all of our lives—the arrival of the most exciting and disruptive......一起来看看 《Hit Refresh》 这本书的介绍吧!