我在配置 SSH 服务器时遇到问题,无法使用公钥登录,无需密码。
tail -f /var/log/auth.log 给出
Feb 6 14:56:06 ubuntu sshd[24654]: rexec line 26: Deprecated option RhostsAuthentication
Feb 6 14:56:28 ubuntu sshd[24654]: Invalid user mpsd from ip.ip.ip.ip
Feb 6 14:56:28 ubuntu sshd[24654]: input_userauth_request: invalid user mpsd [preauth]
Feb 6 14:56:28 ubuntu sshd[24654]: error: Received disconnect from ip.ip.ip.ip: 14: No supported authentication methods available [preauth]
Run Code Online (Sandbox Code Playgroud)
我已经检查过 /home/mpsd/.ssh 有 700 和 /home/mpsd/.ssh/authorized_keys 有 600 权限。authorized_keys 包含在我的远程 Windows 机器上生成的 rsa 公钥。我的 sshd_config 读取
Port 22
# Use these options to restrict which …Run Code Online (Sandbox Code Playgroud)