从第三台计算机登录时 SSH 要求输入密码

从第三台计算机登录时 SSH 要求输入密码

我有 3 个系统:A、B、C。

我可以使用以下组合无密码登录:

  • AB
  • 交流

但当我尝试做ABC,它要求输入密码。我生成了一对用于连接 BC 的新密钥。

不知道哪里出了问题。有什么建议吗?谢谢!

编辑:sshd在 C 上以调试模式运行:

/etc/ssh/sshd_config line 38: Deprecated option RSAAuthentication
debug1: sshd version OpenSSH_7.4, OpenSSL 1.0.2l  25 May 2017
debug1: private host key #0: ssh-rsa xxxx
debug1: private host key #1: xxx
debug1: private host key #2: xxxx
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: inetd sockets after dupping: 3, 3
Connection from 192.168.1.2 port 53084 on 192.168.1.3 port 22
debug1: Client protocol version 2.0; client software version OpenSSH_7.4p1 Raspbian-10+deb9u3
debug1: match: OpenSSH_7.4p1 Raspbian-10+deb9u3 pat OpenSSH* compat 0x04000000
debug1: Local version string SSH-2.0-OpenSSH_7.4p1 Raspbian-10+deb9u3
debug1: Enabling compatibility mode for protocol 2.0
debug1: permanently_set_uid: 107/65534 [preauth]
debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
debug1: SSH2_MSG_KEXINIT sent [preauth]
debug1: SSH2_MSG_KEXINIT received [preauth]
debug1: kex: algorithm: curve25519-sha256 [preauth]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256 [preauth]
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none [preauth]
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none [preauth]
debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
debug1: rekey after 134217728 blocks [preauth]
debug1: SSH2_MSG_NEWKEYS sent [preauth]
debug1: expecting SSH2_MSG_NEWKEYS [preauth]
debug1: SSH2_MSG_NEWKEYS received [preauth]
debug1: rekey after 134217728 blocks [preauth]
debug1: KEX done [preauth]
debug1: userauth-request for user pi service ssh-connection method none [preauth]
debug1: attempt 0 failures 0 [preauth]
reprocess config line 38: Deprecated option RSAAuthentication
debug1: PAM: initializing for "pi"
debug1: PAM: setting PAM_RHOST to "192.168.1.2"
debug1: PAM: setting PAM_TTY to "ssh"

答案1

您的 SSH 客户端上是否启用了 SSH 代理转发?

GitHub 的示例,但通常适用于 SSH 客户端:https://developer.github.com/v3/guides/using-ssh-agent-forwarding/

SSH代理转发的更详细解释:http://www.unixwiz.net/techtips/ssh-agent-forwarding.html

相关内容