为什么SSH悄悄拒绝公钥认证?

Ste*_*ett 0 ssh

我有一个干净的服务器,在 ~/.ssh/authorized_keys 中新生成的 RSA 密钥。

debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: steve_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
Run Code Online (Sandbox Code Playgroud)

我使用正确的私钥还是随机的私钥似乎并不重要。

Ste*_*ett 7

啊。~/.ssh在服务器上需要是私有的。

$ chmod 700 ~/.ssh
Run Code Online (Sandbox Code Playgroud)