SSH 密钥提示密码输入"ssh -Tv git@gitlab.tubit.tu-berlin.de"



我正在尝试使用ED25519通过SSH连接到GitLab,并遵循以下来源:https://docs.gitlab.com/ee/ssh/。当我测试连接并收到欢迎消息时,它不起作用,仍然提示输入密码。我尝试了我的用户密码,但它不起作用,我不确定目前需要哪个密码。这是输出。

ssh -Tv git@gitlab.tubit.tu-berlin.de
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to gitlab.tubit.tu-berlin.de [130.149.7.193] port 22.
debug1: Connection established.
debug1: identity file /home/christian/.ssh/id_rsa type -1
debug1: identity file /home/christian/.ssh/id_rsa-cert type -1
debug1: identity file /home/christian/.ssh/id_dsa type -1
debug1: identity file /home/christian/.ssh/id_dsa-cert type -1
debug1: identity file /home/christian/.ssh/id_ecdsa type -1
debug1: identity file /home/christian/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/christian/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/christian/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/christian/.ssh/id_ed25519 type 3
debug1: identity file /home/christian/.ssh/id_ed25519-cert type -1
debug1: identity file /home/christian/.ssh/id_ed25519_sk type -1
debug1: identity file /home/christian/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/christian/.ssh/id_xmss type -1
debug1: identity file /home/christian/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000002
debug1: Authenticating to gitlab.tubit.tu-berlin.de:22 as 'git'
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: umac-64@openssh.com compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: umac-64@openssh.com 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:aA86J3auCo20sHneGIvwxk/uay4ynBNkWIgiio/qUUw
debug1: Host 'gitlab.tubit.tu-berlin.de' is known and matches the RSA host key.
debug1: Found key in /home/christian/.ssh/known_hosts:3
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: /home/christian/.ssh/id_ed25519 ED25519 SHA256:rFB2QOkPTiiqlMAN1V9RS9QVV2vrgxgRAa9wXm0RdJI agent
debug1: Will attempt key: /home/christian/.ssh/id_rsa 
debug1: Will attempt key: /home/christian/.ssh/id_dsa 
debug1: Will attempt key: /home/christian/.ssh/id_ecdsa 
debug1: Will attempt key: /home/christian/.ssh/id_ecdsa_sk 
debug1: Will attempt key: /home/christian/.ssh/id_ed25519_sk 
debug1: Will attempt key: /home/christian/.ssh/id_xmss 
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/christian/.ssh/id_ed25519 ED25519 SHA256:rFB2QOkPTiiqlMAN1V9RS9QVV2vrgxgRAa9wXm0RdJI agent
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /home/christian/.ssh/id_rsa
debug1: Trying private key: /home/christian/.ssh/id_dsa
debug1: Trying private key: /home/christian/.ssh/id_ecdsa
debug1: Trying private key: /home/christian/.ssh/id_ecdsa_sk
debug1: Trying private key: /home/christian/.ssh/id_ed25519_sk
debug1: Trying private key: /home/christian/.ssh/id_xmss
debug1: Next authentication method: keyboard-interactive
Password: 
debug1: Authentications that can continue: publickey,keyboard-interactive
Password: 
debug1: Authentications that can continue: publickey,keyboard-interactive
Password: 
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
git@gitlab.tubit.tu-berlin.de: Permission denied (publickey,keyboard-interactive).

根据您提到的指南,您需要仔细检查:

  • 您有OpenSSH 6.5或更新版本
  • 您已将公钥复制到您的GitLab用户帐户设置/SSH密钥

我会先用一个不带任何密码的专用SSH密钥来测试它。

最新更新