我无法设置 SSH 密钥身份验证以在不输入密码的情况下仅使用私钥进行登录。这是sshd_config我的 VPS的文件。
# What ports, IPs and protocols we listen for
Port 8707
# 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
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication:
LoginGraceTime 120
PermitRootLogin no …Run Code Online (Sandbox Code Playgroud) ssh-keys ×1