Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想阻止一些用户使用 ssh 登录。我以 root 身份登录并使用 Vi 编辑器对 sshd_config 进行更改。命令是:“vi /etc/ssh/sshd_config” 我在 sshd_config 中添加了“#DenyUsers user1”,然后重新启动了 ssh。但是我仍然可以使用 user1 登录 ssh。我怎样才能阻止它?我必须向您展示 sshd_config 参数吗?谢谢!
引用您添加的内容:
#DenyUsers user1
以 a 开头的#行将被视为注释。换句话说,那些将被忽略。
#
您需要添加
DenyUsers user1
(没有#行首的小号)