Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionDaniel Reynolds
2022-05-30 07:51:27 UTC
Description of problem:
curl prints unexpected messages when using sftp URLs and LogLevel is set
Version-Release number of selected component (if applicable):
- curl-7.61.1-22.el8.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Add LogLevel to `/etc/ssh/ssh_config`
Similar errors shown for FATAL, ERROR, INFO
LogLevel FATAL
2. Fetch file using curl
[dareynol@localhost ~]$ curl -sk -u dareynol sftp://localhost/home/dareynol/test-file test-file.out
Actual results:
Enter host password for user 'dareynol':
[2022/05/30 03:47:59.356338, 1] ssh_config_parse_line: line 3: Unsupported Match keyword 'final', skipping
[2022/05/30 03:47:59.356376, 1] ssh_config_parse_line: Unknown option: GSSAPIKexAlgorithms, line: 3
[2022/05/30 03:47:59.356381, 1] ssh_config_parse_line: Unknown option: CASignatureAlgorithms, line: 6
[2022/05/30 03:47:59.356397, 1] socket_callback_connected: Socket connection callback: 1 (0)
[2022/05/30 03:47:59.356490, 1] ssh_known_hosts_read_entries: Failed to open the known_hosts file '/etc/ssh/ssh_known_hosts': No such file or directory
[2022/05/30 03:47:59.365865, 1] ssh_packet_userauth_failure: Access denied for 'none'. Authentication that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
[2022/05/30 03:47:59.551241, 1] ssh_pki_import_pubkey_file: Error opening /home/dareynol/.ssh/id_ed25519.pub: No such file or directory
[2022/05/30 03:47:59.551273, 1] ssh_pki_import_privkey_file: Error opening /home/dareynol/.ssh/id_ed25519: No such file or directory
[2022/05/30 03:47:59.551278, 1] ssh_pki_import_pubkey_file: Error opening /home/dareynol/.ssh/id_ecdsa.pub: No such file or directory
[2022/05/30 03:47:59.551281, 1] ssh_pki_import_privkey_file: Error opening /home/dareynol/.ssh/id_ecdsa: No such file or directory
[2022/05/30 03:47:59.551285, 1] ssh_pki_import_pubkey_file: Error opening /home/dareynol/.ssh/id_rsa.pub: No such file or directory
[2022/05/30 03:47:59.551289, 1] ssh_pki_import_privkey_file: Error opening /home/dareynol/.ssh/id_rsa: No such file or directory
[2022/05/30 03:47:59.551293, 1] ssh_pki_import_pubkey_file: Error opening /home/dareynol/.ssh/id_dsa.pub: No such file or directory
[2022/05/30 03:47:59.551297, 1] ssh_pki_import_privkey_file: Error opening /home/dareynol/.ssh/id_dsa: No such file or directory
[2022/05/30 03:47:59.573869, 1] ssh_packet_global_request: Invalid SSH_MSG_GLOBAL_REQUEST packet
Expected results:
[dareynol@rhel7 ~]$ curl -sk -u dareynol sftp://localhost/home/dareynol/test-file -o test-file.out
Enter host password for user 'dareynol':
[dareynol@rhel7 ~]$ q
Additional info:
RHEL 7 works as expected.
- rpm version curl-7.29.0-59.el7_9.1.x86_64
Not that I was asked but I believe the info is already available in comment #0:
- LogLevel is set in `/etc/ssh/ssh_config`, which is installed by openssh-clients
- curl is not failing, it just prints unexpected messages
The ssh_config(5) man page says it is OpenSSH client configuration file though. In particular, the documentation of LogLevel says:
"Gives the verbosity level that is used when logging messages from ssh(1)."
I do not think it works as documented.
(In reply to Kamil Dudka from comment #6)
> The ssh_config(5) man page says it is OpenSSH client configuration file
> though. In particular, the documentation of LogLevel says:
>
> "Gives the verbosity level that is used when logging messages from
> ssh(1)."
>
> I do not think it works as documented.
Libssh in contrast to OpenSSH does not provide any client application (as ssh[1]) and uses LogLevel
(and overall the configuration file) for any connection being made as a client. (function ssh_connect)
Apart from the missing documentation, the implementation in libssh [1] is totally incompatible with OpenSSH:
(1) OpenSSH sets default LogLevel to INFO. So setting LogLevel to INFO should not change the behavior. libssh defaults to QUIET.
(2) Setting LogLevel to FATAL or ERROR causes OpenSSH to print fewer diagnostic messages, which quite opposite to what libssh does.
So the changes to a config file of OpenSSH lead to completely unexpected changes in the behavior of curl. This needs to be fixed.
[1] https://git.libssh.org/projects/libssh.git/tree/src/bind_config.c?h=libssh-0.9.6#n412
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (libssh bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:3008
Description of problem: curl prints unexpected messages when using sftp URLs and LogLevel is set Version-Release number of selected component (if applicable): - curl-7.61.1-22.el8.x86_64 How reproducible: Always Steps to Reproduce: 1. Add LogLevel to `/etc/ssh/ssh_config` Similar errors shown for FATAL, ERROR, INFO LogLevel FATAL 2. Fetch file using curl [dareynol@localhost ~]$ curl -sk -u dareynol sftp://localhost/home/dareynol/test-file test-file.out Actual results: Enter host password for user 'dareynol': [2022/05/30 03:47:59.356338, 1] ssh_config_parse_line: line 3: Unsupported Match keyword 'final', skipping [2022/05/30 03:47:59.356376, 1] ssh_config_parse_line: Unknown option: GSSAPIKexAlgorithms, line: 3 [2022/05/30 03:47:59.356381, 1] ssh_config_parse_line: Unknown option: CASignatureAlgorithms, line: 6 [2022/05/30 03:47:59.356397, 1] socket_callback_connected: Socket connection callback: 1 (0) [2022/05/30 03:47:59.356490, 1] ssh_known_hosts_read_entries: Failed to open the known_hosts file '/etc/ssh/ssh_known_hosts': No such file or directory [2022/05/30 03:47:59.365865, 1] ssh_packet_userauth_failure: Access denied for 'none'. Authentication that can continue: publickey,gssapi-keyex,gssapi-with-mic,password [2022/05/30 03:47:59.551241, 1] ssh_pki_import_pubkey_file: Error opening /home/dareynol/.ssh/id_ed25519.pub: No such file or directory [2022/05/30 03:47:59.551273, 1] ssh_pki_import_privkey_file: Error opening /home/dareynol/.ssh/id_ed25519: No such file or directory [2022/05/30 03:47:59.551278, 1] ssh_pki_import_pubkey_file: Error opening /home/dareynol/.ssh/id_ecdsa.pub: No such file or directory [2022/05/30 03:47:59.551281, 1] ssh_pki_import_privkey_file: Error opening /home/dareynol/.ssh/id_ecdsa: No such file or directory [2022/05/30 03:47:59.551285, 1] ssh_pki_import_pubkey_file: Error opening /home/dareynol/.ssh/id_rsa.pub: No such file or directory [2022/05/30 03:47:59.551289, 1] ssh_pki_import_privkey_file: Error opening /home/dareynol/.ssh/id_rsa: No such file or directory [2022/05/30 03:47:59.551293, 1] ssh_pki_import_pubkey_file: Error opening /home/dareynol/.ssh/id_dsa.pub: No such file or directory [2022/05/30 03:47:59.551297, 1] ssh_pki_import_privkey_file: Error opening /home/dareynol/.ssh/id_dsa: No such file or directory [2022/05/30 03:47:59.573869, 1] ssh_packet_global_request: Invalid SSH_MSG_GLOBAL_REQUEST packet Expected results: [dareynol@rhel7 ~]$ curl -sk -u dareynol sftp://localhost/home/dareynol/test-file -o test-file.out Enter host password for user 'dareynol': [dareynol@rhel7 ~]$ q Additional info: RHEL 7 works as expected. - rpm version curl-7.29.0-59.el7_9.1.x86_64