- User Since
- Nov 7 2017, 9:55 AM (178 w, 4 d)
Sun, Mar 28
This was merged some time ago. Thank you for your contribution!
I was searching for this some time ago and found a function ssh_string_free_char(). Would it solve your issue?
This was merged as 51b7a242
This was merged as 06799453
Wed, Mar 17
Cool. Good to hear that it worked for you. But this is just short-term solution. Long term is upgrading your server.
From my fast check, Fedora 33 no longer supports authentication using ssh-rsa (with SHA1)
Feb 9 2021
Thank you for the report. The read_packet buffer is initialized in sftp_new().
Feb 3 2021
Thank you for a suggestion. This sounds like a good idea. Do you want to submit a merge request with this functionality in https://gitlab.com/libssh/libssh-mirror ? We already have some *_free() functions for our objects already, but I do not think there is a generic one for simple objects/bytes.
Looks good to me. Can you submit the patch in https://gitlab.com/libssh/libssh-mirror as a merge request with proper signoff trailers as described in the contributing guidelines?
Sorry, I did not get email notification about this issue so thank you for the ping on IRC.
Jan 1 2021
@tmds Can you submit your change as a merge request in
Here are some deibugging tips for dolphin and libssh:
Dec 16 2020
What version of libssh are you using?
Dec 8 2020
Dec 2 2020
What version of libssh are you using? Saying "does not work" is too broad. What you expect? What happens? Do you have some errors? Debug log would be also useful.
Nov 19 2020
This could be a nice exercise when getting familiar with openssl :) It makes sense to do it with openssl 3.0 more than with the 1.1.1, but as written in the description, it does not have a potential to finding many bugs with high impact.
Hi qgarnier, any update on this?
Windows 7 is EOL since January 14, 2020. I don't think it makes sense to debug an issue on a platform that is unsupported by vendor (which is more than 10 years old).
There were many bugfixes since 0.9.2. If it works with 0.9.4, all I can do is recommend you to update to 0.9.4 or newer. We do not intend to update 0.9.2.x versions.
Nov 18 2020
Fixed in 5348267f for the reference
FYI, this is now enabled by default in OpenSSH's HEAD, which will probably make it in release in ~6 months. This would make it very useful for libssh to support now.
Thank you for the report and analysis. It looks reasonable to add this reset to disconnect function, rather than keeping it in invalid state. I submitted the following merge request for review:
Sep 25 2020
AVC errors are logged in journal or in audit.log. ausearch -m AVC is helpfult too.
Do you have some AVC errors? Does it work with SELinux in permissive?
Is your user somehow restricted (for example by SELinux)? Do you have some AVC errors? Does it work with SELinux in permissive?
Sep 23 2020
Sep 22 2020
We are not primarily C++ developers so the C++ wrapper is the minimal support we could provide. If you know how to do this in sensible way, submitting a pull request with the patch (ideally also with demonstration in examples) would be the simplest way how to get this in.
Sep 3 2020
Some server logs might be helpful, but it looks like it is some non-standard ssh implementation so it might be hard.
Please, share what code did you use (what function calls). The server can be restrticted to SFTP only and if you try to open different channel, it can fail. To create sftp channel, you should use just sftp_new(), sftp_init() as in the examples/samplesftp.c.
Aug 20 2020
Thank you for confirming it fixed your issue. Glad to help.
Aug 17 2020
If I remember and read the code well, gcrypt does not have PEM parser (as it is mostly library for gnupg) so not all key formats are supported with gcrypt (we can do only the simple legacy PEM format, not the new PKCS8 PEM, which is default for some years in OpenSSL). OpenSSL provides sensible PEM parser which can parse quite much any key.
Aug 14 2020
Can you share verbose libssh log from your application attempting to log in? It should give you some idea what went wrong with this attempt.
Aug 13 2020
Merged in master as c0b65cc
Aug 12 2020
On windows yes, but it would fail everywhere else, where ssh_init_mutex is static mutex. Feel free to submit your suggested change in the gitlab -- it should run it through the CI to check if it works:
This looks like Windows-only issue. If the pthreads on Linux are used, the mutex is initialized statically, which is probably a reason why it does not pop up for us. It looks like windows locks do not support static initialization.
The ssh_channel_request_exec() executes separate command in separate ssh execute channel, which on the server results in starting a new shell, executing a command and exiting. Running separate commands this way does not work if you want the one affect the other. If you need this behavior, you should check how to open a shell, feed it with commands and read the output as described in the following chapter of the tutorial: https://api.libssh.org/stable/libssh_tutor_shell.html
Aug 5 2020
Do you see some errors in the server logs?
Jul 15 2020
No problem. I had to check how is this used in libssh myself as I never looked into this before.
Jul 11 2020
We test interoperability with OpenSSH so our implementation is compatible with OpenSSH one. So either we both are wrong or the srtSSHServer_11.00 is wrong. I would recommend you either check the server side for more logs or errors and/or contact the vendor/support of the server that you have this issue. It should be trivial for them to reproduce/debug the issue as libssh and openssh are opensource and they can reliably reproduce the issue. From just this log, we can hardly guess what the blackbox server does not like on this key exchange method implementation.
Jul 8 2020
Thanks for confirmation. Even though you can not change the server settings, there might be something useful in the logs pointing out what is the issue. It could be bug in srtSSHServer implementation or libssh implementation of the new diffie-hellman-group18-sha512 so it is worth investigating.
Jul 7 2020
This is an issue of key exchange, not ciphres. The original trace is using probably diffie-hellman-group14-sha1 and the new one diffie-hellman-group18-sha512. The error invalid DH value comes from the server so I would suggest continuing some investigation there, figuring out what it does not like on the provided DH value.
Jul 1 2020
Jun 30 2020
I do not think nacl is used for anything at this moment when libssh is built against current openssl, which already supports X25519 curve for all we need. At least in Fedora, nacl is not listed as dependency of libssh at all.
Jun 18 2020
Thank you for checking. It looks like I was too fast guessing the fix.
Jun 10 2020
Sounds like a mitigation to some of the security issues fixed in 0.9.3. See the announcement message for more details:
Jun 9 2020
Playing a bit more with that, it looks like a version 8.7.0 returns SSH_AUTH_AGAIN from ssh_userauth_none(), even though it is in blocking mode. It is certainly not correct, but better than not returning at all. But only after a timeout, which it spends in busy-loop wait.
Jun 8 2020
I am able to reproduce this locally. The server sends SSH_MSG_DISCONNECT to the client, but in the ssh_userauth_get_response(), this message is not accepted to terminate waiting for answer from server in ssh_auth_response_termination() so it hangs forever in the poll -- I think this is a bug in poll implementation, which should stop waiting after receiving disconnect.
May 25 2020
Right. It affects only 0.9.x versions. The above commit mentions which revision introduced this issue. The commit is already backported in the stable-0.9 branch so it will be in the next 0.9.5 release
Could it be a duplicate of an issue described and fixed in this commit ? It was also discussed in mailing list recently. Does it work with current master?
May 21 2020
Merged as 4e4711d2 and friends.
Fixed in previously mentioned commits.
May 7 2020
FYI, this landed as e6aee24a
May 6 2020
Apr 24 2020
Apr 22 2020
It is still needed as the configuration parsing requires the hostname to evaluate conditional match blocks. But the new API ssh_options_set() should be used and documentation updated accordingly. The documentation should also mention that if it is not called, it is called automatically on connect.
Apr 21 2020
The previously mentioned commit disables the RSA-SHA1 and DSA algorithms by default.
Apr 20 2020
Apr 16 2020
AFAIK this was already addressed by using ssh -Q to query openssh supported algorithms and we have ubuntu 18.04 in CI to prevent similar issues in future.
Looks like the CI is running VS2017, which has still openssl 1.0.2. Would be nice to run against something supported.
This sounds like an issue discussed in . Can you check if it still happens with the current master + proposed fixes?
This has changed recently in master with commit 742d81ec. Can you check if you can still reproduce the issue with the referenced commit/master/