Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#63445 - [libssh2] PLEASE ENTER SUMMARY

Attached to Project: Arch Linux
Opened by Klesh Wong (klesh) - Monday, 12 August 2019, 14:43 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 13 September 2020, 12:42 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
libssh2 v1.8.2-1 fail to handle cutome identity file correctly. and was fixed @1.9.0


Additional info:
* package version(s) 1.8.2-1
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
1. Say I have a user name `sftpkey` with home directory at /home/sftpkey on a Remote Server
2. Generate a pair of rsa keys `id_rsa` and `id_rsa.pub` with command `ssh-genkey`
3. Copy public key to Remote Server
4. Both `ssh` and `curl` command will run perfectly.
5. However, if I move `id_rsa` and `id_rsa.pub` to other location, `ssh` will still works, but not `curl`
6. Here are the message that `curl` would produce
```
curl --key id_rsa --pubkey id_rsa.pub sftp://sftpkey@localhost/home/sftpkey/hello.txt -k -vv * Trying ::1:22... * TCP_NODELAY set * Connected to localhost (::1) port 22 (#0) * SSH MD5 fingerprint: b69d29c4cabf1d080f70fadd9d7e4743 * SSH authentication methods available: publickey,password * Using SSH public key file 'id_rsa.pub' * Using SSH private key file 'id_rsa' * SSH public key authentication failed: Callback returned error * Failure connecting to agent * Authentication failure * Closing connection 0 curl: (67) Authentication failure
```
7. By downloading `libssh2` 1.9.0 from https://www.libssh2.org/ and building, then replacing /usr/lib/libssh2.so* file. `curl` works again...
```
root@arch ~# curl --key id_rsa --pubkey id_rsa.pub sftp://sftpkey@localhost/home/sftpkey/hello.txt -k -vv * Trying ::1:22... * TCP_NODELAY set * Connected to localhost (::1) port 22 (#0) * SSH MD5 fingerprint: 8ccb5cb9f60339d011a743f3de35b285 * SSH authentication methods available: publickey,password * Using SSH public key file 'id_rsa.pub' * Using SSH private key file 'id_rsa' * Initialized SSH public key authentication * Authentication complete hello * Connection #0 to host localhost left intact
```
This task depends upon

Closed by  Jelle van der Waa (jelly)
Sunday, 13 September 2020, 12:42 GMT
Reason for closing:  Fixed
Additional comments about closing:  libssh2 1.9.0
Comment by Dave Reisner (falconindy) - Wednesday, 28 August 2019, 10:30 GMT
libssh2 1.9.0 is in testing now.

Loading...