返回列表 发布新帖

gitlab免密验证失败,如何登录

249 7
发表于 2024-6-6 17:49:22 | 显示全部楼层 阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×

$ ssh -v [email]git@128.0.0.55[/email] OpenSSH_9.7p1, OpenSSL 3.2.1 30 Jan 2024 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Connecting to 128.0.0.55 [128.0.0.55] port 22. debug1: Connection established. debug1: identity file /c/Users/Administrator/.ssh/id_rsa type 0 debug1: identity file /c/Users/Administrator/.ssh/id_rsa-cert type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa-cert type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa_sk type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa_sk-cert type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ed25519 type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ed25519-cert type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ed25519_sk type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ed25519_sk-cert type -1 debug1: identity file /c/Users/Administrator/.ssh/id_xmss type -1 debug1: identity file /c/Users/Administrator/.ssh/id_xmss-cert type -1 debug1: identity file /c/Users/Administrator/.ssh/id_dsa type -1 debug1: identity file /c/Users/Administrator/.ssh/id_dsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_9.7 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1 debug1: compat_banner: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000002 debug1: Authenticating to 128.0.0.55:22 as 'git' debug1: load_hostkeys: fopen /c/Users/Administrator/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: [email]curve25519-sha256@libssh.org[/email] debug1: kex: host key algorithm: ssh-ed25519 debug1: kex: server->client cipher: [email]chacha20-poly1305@openssh.com[/email] MAC: <implicit> compression: none debug1: kex: client->server cipher: chacha20-poly130

回复

使用道具 举报

评论7

zookeeperLv.7 发表于 2024-6-6 18:02:34 | 显示全部楼层
您的日志好像没有截完整?ssh具体报什么错误呢?
回复

使用道具 举报

hy_worker楼主Lv.1 发表于 2024-6-6 18:03:14 | 显示全部楼层
Administrator@WIN-1SNENHT3EGK MINGW64 /c/Git_Home (master)
$ ssh -v git@128.0.0.55
OpenSSH_9.7p1, OpenSSL 3.2.1 30 Jan 2024
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 128.0.0.55 [128.0.0.55] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Administrator/.ssh/id_rsa type 0
debug1: identity file /c/Users/Administrator/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa_sk type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ed25519 type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ed25519-cert type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ed25519_sk type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /c/Users/Administrator/.ssh/id_xmss type -1
debug1: identity file /c/Users/Administrator/.ssh/id_xmss-cert type -1
debug1: identity file /c/Users/Administrator/.ssh/id_dsa type -1
debug1: identity file /c/Users/Administrator/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: compat_banner: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000002
debug1: Authenticating to 128.0.0.55:22 as 'git'
debug1: load_hostkeys: fopen /c/Users/Administrator/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:xIZkCy3Q/3+JBtEB+z63a5nlJBJK34dM4K6E2YeuL30
debug1: load_hostkeys: fopen /c/Users/Administrator/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host '128.0.0.55' is known and matches the ED25519 host key.
debug1: Found key in /c/Users/Administrator/.ssh/known_hosts:1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: agent returned 1 keys
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_rsa RSA SHA256:swkaoYkYjivevxtRnWn4pSGwWwE7/YlQ1in92Yh/cio agent
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_ecdsa
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_ecdsa_sk
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_ed25519
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_ed25519_sk
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_xmss
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_dsa
debug1: Offering public key: /c/Users/Administrator/.ssh/id_rsa RSA SHA256:swkaoYkYjivevxtRnWn4pSGwWwE7/YlQ1in92Yh/cio agent
debug1: send_pubkey_test: no mutual signature algorithm
debug1: Trying private key: /c/Users/Administrator/.ssh/id_ecdsa
debug1: Trying private key: /c/Users/Administrator/.ssh/id_ecdsa_sk
debug1: Trying private key: /c/Users/Administrator/.ssh/id_ed25519
debug1: Trying private key: /c/Users/Administrator/.ssh/id_ed25519_sk
debug1: Trying private key: /c/Users/Administrator/.ssh/id_xmss
debug1: Trying private key: /c/Users/Administrator/.ssh/id_dsa
debug1: Next authentication method: password
git@128.0.0.55's password:
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
git@128.0.0.55's password:
回复

使用道具 举报

hy_worker楼主Lv.1 发表于 2024-6-7 09:44:38 | 显示全部楼层
zookeeper 发表于 2024-6-6 18:02
您的日志好像没有截完整?ssh具体报什么错误呢?

具体报错发出去了,怎么一直没审核呢
回复

使用道具 举报

hy_worker楼主Lv.1 发表于 2024-6-7 09:44:59 | 显示全部楼层
zookeeper 发表于 2024-6-6 18:02
您的日志好像没有截完整?ssh具体报什么错误呢?

Administrator@WIN-1SNENHT3EGK MINGW64 /c/Git_Home (master)
$ ssh -v git@128.0.0.55
OpenSSH_9.7p1, OpenSSL 3.2.1 30 Jan 2024
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 128.0.0.55 [128.0.0.55] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Administrator/.ssh/id_rsa type 0
debug1: identity file /c/Users/Administrator/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa_sk type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ed25519 type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ed25519-cert type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ed25519_sk type -1
debug1: identity file /c/Users/Administrator/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /c/Users/Administrator/.ssh/id_xmss type -1
debug1: identity file /c/Users/Administrator/.ssh/id_xmss-cert type -1
debug1: identity file /c/Users/Administrator/.ssh/id_dsa type -1
debug1: identity file /c/Users/Administrator/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: compat_banner: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000002
debug1: Authenticating to 128.0.0.55:22 as 'git'
debug1: load_hostkeys: fopen /c/Users/Administrator/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:xIZkCy3Q/3+JBtEB+z63a5nlJBJK34dM4K6E2YeuL30
debug1: load_hostkeys: fopen /c/Users/Administrator/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host '128.0.0.55' is known and matches the ED25519 host key.
debug1: Found key in /c/Users/Administrator/.ssh/known_hosts:1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: agent returned 1 keys
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_rsa RSA SHA256:swkaoYkYjivevxtRnWn4pSGwWwE7/YlQ1in92Yh/cio agent
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_ecdsa
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_ecdsa_sk
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_ed25519
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_ed25519_sk
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_xmss
debug1: Will attempt key: /c/Users/Administrator/.ssh/id_dsa
debug1: Offering public key: /c/Users/Administrator/.ssh/id_rsa RSA SHA256:swkaoYkYjivevxtRnWn4pSGwWwE7/YlQ1in92Yh/cio agent
debug1: send_pubkey_test: no mutual signature algorithm
debug1: Trying private key: /c/Users/Administrator/.ssh/id_ecdsa
debug1: Trying private key: /c/Users/Administrator/.ssh/id_ecdsa_sk
debug1: Trying private key: /c/Users/Administrator/.ssh/id_ed25519
debug1: Trying private key: /c/Users/Administrator/.ssh/id_ed25519_sk
debug1: Trying private key: /c/Users/Administrator/.ssh/id_xmss
debug1: Trying private key: /c/Users/Administrator/.ssh/id_dsa
debug1: Next authentication method: password
git@128.0.0.55's password:
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
git@128.0.0.55's password:
回复

使用道具 举报

hy_worker楼主Lv.1 发表于 2024-6-7 09:45:12 | 显示全部楼层

Administrator@WIN-1SNENHT3EGK MINGW64 /c/Git_Home (master) $ ssh -v [email]git@128.0.0.55[/email] OpenSSH_9.7p1, OpenSSL 3.2.1 30 Jan 2024 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Connecting to 128.0.0.55 [128.0.0.55] port 22. debug1: Connection established. debug1: identity file /c/Users/Administrator/.ssh/id_rsa type 0 debug1: identity file /c/Users/Administrator/.ssh/id_rsa-cert type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa-cert type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa_sk type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ecdsa_sk-cert type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ed25519 type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ed25519-cert type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ed25519_sk type -1 debug1: identity file /c/Users/Administrator/.ssh/id_ed25519_sk-cert type -1 debug1: identity file /c/Users/Administrator/.ssh/id_xmss type -1 debug1: identity file /c/Users/Administrator/.ssh/id_xmss-cert type -1 debug1: identity file /c/Users/Administrator/.ssh/id_dsa type -1 debug1: identity file /c/Users/Administrator/.ssh/id_dsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_9.7 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1 debug1: compat_banner: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000002 debug1: Authenticating to 128.0.0.55:22 as 'git' debug1: load_hostkeys: fopen /c/Users/Administrator/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: [email]curve25519-sha256@libssh.org[/email] debug1: kex: host key algorithm: ssh-ed25519 debug1: kex: server->client cipher: [email]chacha20-poly1305@openssh.com[/email] MAC: <implicit> compression: none debug1: kex: client->server cipher: [email]chacha20-poly1305@openssh.com[/email] MAC: <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: SSH2_MSG_KEX_ECDH_REPLY received debug1: Server host key: ssh-ed25519 SHA256:xIZkCy3Q/3+JBtEB+z63a5nlJBJK34dM4K6E2YeuL30 debug1: load_hostkeys: fopen /c/Users/Administrator/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: Host '128.0.0.55' is known and matches the ED25519 host key. debug1: Found key in /c/Users/Administrator/.ssh/known_hosts:1 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 134217728 blocks debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Next authentication method: publickey debug1: get_agent_identities: bound agent to hostkey debug1: get_agent_identities: agent returned 1 keys debug1: Will attempt key: /c/Users/Administrator/.ssh/id_rsa RSA SHA256:swkaoYkYjivevxtRnWn4pSGwWwE7/YlQ1in92Yh/cio agent debug1: Will attempt key: /c/Users/Administrator/.ssh/id_ecdsa debug1: Will attempt key: /c/Users/Administrator/.ssh/id_ecdsa_sk debug1: Will attempt key: /c/Users/Administrator/.ssh/id_ed25519 debug1: Will attempt key: /c/Users/Administrator/.ssh/id_ed25519_sk debug1: Will attempt key: /c/Users/Administrator/.ssh/id_xmss debug1: Will attempt key: /c/Users/Administrator/.ssh/id_dsa debug1: Offering public key: /c/Users/Administrator/.ssh/id_rsa RSA SHA256:swkaoYkYjivevxtRnWn4pSGwWwE7/YlQ1in92Yh/cio agent debug1: send_pubkey_test: no mutual signature algorithm debug1: Trying private key: /c/Users/Administrator/.ssh/id_ecdsa debug1: Trying private key: /c/Users/Administrator/.ssh/id_ecdsa_sk debug1: Trying private key: /c/Users/Administrator/.ssh/id_ed25519 debug1: Trying private key: /c/Users/Administrator/.ssh/id_ed25519_sk debug1: Trying private key: /c/Users/Administrator/.ssh/id_xmss debug1: Trying private key: /c/Users/Administrator/.ssh/id_dsa debug1: Next authentication method: password [email]git@128.0.0.55[/email]'s password: debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password Permission denied, please try again. [email]git@128.0.0.55[/email]'s password:

回复

使用道具 举报

hy_worker楼主Lv.1 发表于 2024-6-11 14:50:41 | 显示全部楼层
有人回复下吗
回复

使用道具 举报

zookeeperLv.7 发表于 2024-6-11 21:45:50 | 显示全部楼层
提供一下思路吧
1. 检查sshd_config有没有异常配置
2. 检查一下个人设置中的ssh密钥是否和服务器匹配,将这串密钥在文件/var/opt/gitlab/.ssh/authorized_keys中查找如果匹配,看看是不是能匹配的上,如果没有考虑重新删除ssh密钥配置或者检查有没有进行ssh密钥配置。

                               
登录/注册后可看大图

3. 更换密钥
4. 检查authorized_keys权限是否600
5. 开启ssh 调试,再通过ssh 连接8002端口,进行debug日志的仔细排查
  1. /usr/sbin/sshd -d -p 8002
复制代码

WechatIMG500.jpg
回复

使用道具 举报

意见建议

Email:forum@gitlab.cn
  • 关注公众号
  • 添加专业顾问
Copyright © 2001-2024 极狐GitLab论坛 版权所有 All Rights Reserved. 鄂ICP备2021008419号-1|鄂公网安备42018502006137号
关灯 快速发帖
扫一扫添加专业顾问
返回顶部
快速回复 返回顶部 返回列表