带有 ssh 的 svn:身份验证失败

带有 ssh 的 svn:身份验证失败

我正在尝试更新远程 Subversion 存储库,但失败了。尝试调试它,这是消息:

debug1: Reading configuration data /home/balikas/.ssh/config
debug1: /home/balikas/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to scm.forge.imag.fr [129.88.34.5] port 22.
debug1: Connection established.
debug1: identity file /home/balikas/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/balikas/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/balikas/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/balikas/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/balikas/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/balikas/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/balikas/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/balikas/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-5+b1
debug1: match: OpenSSH_5.5p1 Debian-5+b1 pat OpenSSH_5* compat 0x0c000000
debug1: Authenticating to scm.forge.imag.fr:22 as 'balikas'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: [email protected] compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: [email protected] compression: none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<3072<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:F5s/dbFtkqwi2MPbvBufYRf4XLzyBit+D6Px8c97u4s
debug1: Host 'scm.forge.imag.fr' is known and matches the RSA host key.
debug1: Found key in /home/balikas/.ssh/known_hosts:1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).

我已将 ~/.ssh 重命名为 ~/.ssh_backup 并重复该过程,但问题仍未解决。我还尝试通过以下方式强制 ssh 要求键盘身份验证:

export SVN_SSH="ssh -v -o PubkeyAuthentication=no"

但它仍然不要求键盘认证。

我的问题是(互补):

  1. 我该如何帮助解决身份验证问题?
  2. 我可以强制进行键盘验证吗?这是一个临时的解决方案?

答案1

您不能强制客户端使用服务器不提供。如果是,那么客户端将在公钥失败后尝试自动使用它。

换句话说,服务器管理员已禁用除之外的所有其他身份验证机制publickey,因此您必须与他们讨论为什么您的密钥(id_rsa 文件)不被允许访问。

服务器端的身份验证设置在 中/etc/ssh/sshd_config

相关内容