gogs: SSH Key import fails on CentOS/RHEL 5

  • Gogs version (or commit ref): 0.14.1
  • Git version: 1.7.4.1
  • Operating system: CentOS 5
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gogs.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

SSHKeyGenParsePublicKey fails with OpenSSH_4.3, shipped with CentOS 5.

This is because as per the Windows check in the method, OpenSSH 4…3 also does not output the key type, therefore there are only 3 fields returned and the check fails.

Therefore adding any key fails, making SSH useless.

[user@host ~]$ ssh -V
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
[user@host ~]$ ssh-keygen -l -f /home/user/id_rsa.pub 
4096 04:87:56:4a:55:c6:97:a3:b7:98:92:96:be:ae:00:43 /home/user/id_rsa.pub

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Works great! Thanks!