宇宙主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

欧基零壹微头条IP归属甄别会员请立即修改密码
查看: 637|回复: 1

[美国VPS] mjj们,gitlab配置好了ssh密钥,但是无法登录,可以帮我看...

[复制链接]
发表于 2024-1-26 18:56:56 | 显示全部楼层 |阅读模式
  1. $ ssh -T -v -p 30001 [email protected]
  2. OpenSSH_9.3p1, OpenSSL 3.1.1 30 May 2023
  3. debug1: Reading configuration data /c/Users/99192/.ssh/config
  4. debug1: Reading configuration data /etc/ssh/ssh_config
  5. debug1: Connecting to 192.168.5.235 [192.168.5.235] port 30001.
  6. debug1: Connection established.
  7. debug1: identity file /c/Users/99192/.ssh/id_rsa type -1
  8. debug1: identity file /c/Users/99192/.ssh/id_rsa-cert type -1
  9. debug1: identity file /c/Users/99192/.ssh/id_ecdsa type -1
  10. debug1: identity file /c/Users/99192/.ssh/id_ecdsa-cert type -1
  11. debug1: identity file /c/Users/99192/.ssh/id_ecdsa_sk type -1
  12. debug1: identity file /c/Users/99192/.ssh/id_ecdsa_sk-cert type -1
  13. debug1: identity file /c/Users/99192/.ssh/id_ed25519 type 3
  14. debug1: identity file /c/Users/99192/.ssh/id_ed25519-cert type -1
  15. debug1: identity file /c/Users/99192/.ssh/id_ed25519_sk type -1
  16. debug1: identity file /c/Users/99192/.ssh/id_ed25519_sk-cert type -1
  17. debug1: identity file /c/Users/99192/.ssh/id_xmss type -1
  18. debug1: identity file /c/Users/99192/.ssh/id_xmss-cert type -1
  19. debug1: identity file /c/Users/99192/.ssh/id_dsa type -1
  20. debug1: identity file /c/Users/99192/.ssh/id_dsa-cert type -1
  21. debug1: Local version string SSH-2.0-OpenSSH_9.3
  22. debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.2
  23. debug1: compat_banner: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.2 pat OpenSSH* compat 0x04000000
  24. debug1: Authenticating to 192.168.5.235:30001 as 'test'
  25. debug1: load_hostkeys: fopen /c/Users/99192/.ssh/known_hosts2: No such file or directory
  26. debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
  27. debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
  28. debug1: SSH2_MSG_KEXINIT sent
  29. debug1: SSH2_MSG_KEXINIT received
  30. debug1: kex: algorithm: curve25519-sha256
  31. debug1: kex: host key algorithm: ssh-ed25519
  32. debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
  33. debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
  34. debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
  35. debug1: SSH2_MSG_KEX_ECDH_REPLY received
  36. debug1: Server host key: ssh-ed25519 SHA256:hqhfESj5oWFkoqjXnnLjxSYqlDSapKkeNRyW5saL0IM
  37. debug1: load_hostkeys: fopen /c/Users/99192/.ssh/known_hosts2: No such file or directory
  38. debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
  39. debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
  40. debug1: Host '[192.168.5.235]:30001' is known and matches the ED25519 host key.
  41. debug1: Found key in /c/Users/99192/.ssh/known_hosts:5
  42. debug1: rekey out after 134217728 blocks
  43. debug1: SSH2_MSG_NEWKEYS sent
  44. debug1: expecting SSH2_MSG_NEWKEYS
  45. debug1: SSH2_MSG_NEWKEYS received
  46. debug1: rekey in after 134217728 blocks
  47. debug1: get_agent_identities: bound agent to hostkey
  48. debug1: get_agent_identities: agent returned 1 keys
  49. debug1: Will attempt key: /c/Users/99192/.ssh/id_ed25519 ED25519 SHA256:LKGgr4p5eDgiBWTvVNCo7zub/B8+Zlt3Xz6Epy921LI agent
  50. debug1: Will attempt key: /c/Users/99192/.ssh/id_rsa
  51. debug1: Will attempt key: /c/Users/99192/.ssh/id_ecdsa
  52. debug1: Will attempt key: /c/Users/99192/.ssh/id_ecdsa_sk
  53. debug1: Will attempt key: /c/Users/99192/.ssh/id_ed25519_sk
  54. debug1: Will attempt key: /c/Users/99192/.ssh/id_xmss
  55. debug1: Will attempt key: /c/Users/99192/.ssh/id_dsa
  56. debug1: SSH2_MSG_EXT_INFO received
  57. debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected]>
  58. debug1: SSH2_MSG_SERVICE_ACCEPT received
  59. debug1: Authentications that can continue: publickey
  60. debug1: Next authentication method: publickey
  61. debug1: Offering public key: /c/Users/99192/.ssh/id_ed25519 ED25519 SHA256:LKGgr4p5eDgiBWTvVNCo7zub/B8+Zlt3Xz6Epy921LI agent
  62. debug1: Authentications that can continue: publickey
  63. debug1: Trying private key: /c/Users/99192/.ssh/id_rsa
  64. debug1: Trying private key: /c/Users/99192/.ssh/id_ecdsa
  65. debug1: Trying private key: /c/Users/99192/.ssh/id_ecdsa_sk
  66. debug1: Trying private key: /c/Users/99192/.ssh/id_ed25519_sk
  67. debug1: Trying private key: /c/Users/99192/.ssh/id_xmss
  68. debug1: Trying private key: /c/Users/99192/.ssh/id_dsa
  69. debug1: No more authentication methods to try.
  70. [email protected]: Permission denied (publickey).
复制代码


在群晖上装了gitlab,想试试ssh来push,结果提示Permission denied。然后上面是排查问题时候的输出。不知道为什么已经提示了 Host '[192.168.5.235]:30001' is known and matches the ED25519 host key. 但是最后还是Permission denied (publickey)
发表于 2024-1-26 19:41:08 | 显示全部楼层
没指定用哪个 private key。
可以在命令行加(ssh -i [identity file]),或者在 ssh 的 config 加:
  1. Host github.com
  2.     HostName github.com
  3.     User git
  4.     IdentityFile ~/.ssh/your_private_key
  5.     IdentitiesOnly yes
复制代码

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|FastFib VPS论坛

GMT+8, 2024-9-20 08:02 , Processed in 0.064635 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表