小编use*_*805的帖子

如何强制 SSH 只允许有密钥的用户登录?

我尝试按照此处的说明进行操作:http : //lani78.wordpress.com/2008/08/08/generate-a-ssh-key-and-disable-password-authentication-on-ubuntu-server/

只允许在服务器上使用公钥的用户进行身份验证,但我无法让 SSH 禁止仅使用用户名/密码登录。

这是我的 sshd_config 文件 - 我错过了什么吗?我已经尝试重新启动 SSH 和计算机本身。

# Package generated configuration file
# See the sshd_config(5) manpage for details


# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes


# Lifetime and size …
Run Code Online (Sandbox Code Playgroud)

ssh sshd

110
推荐指数
3
解决办法
24万
查看次数

标签 统计

ssh ×1

sshd ×1