Sorry, I can't create a proper PR at the moment (permissions problems and the 'create merge request' by email likewise), and I've not been able to test-compile this code on the latest version - but I have confirmed the same fix works on 0.7.5.
Mon, Apr 6
Thu, Apr 2
Wed, Apr 1
Mon, Mar 30
Sun, Mar 29
Fri, Mar 27
Tue, Mar 24
Mon, Mar 23
Sun, Mar 22
Sat, Mar 21
For those who're interested, I wrote a new patch from scratch which is based on the latest 0.9.3 release.
Mon, Mar 16
Mar 7 2020
Use correct assert function for ssh return codes, Some of these codes are below in the page. When and from where you want to need help you can easily get it, And we show you some simple methods which are important for best assignment writing service learning and also for getting experience.
Mar 5 2020
Feb 26 2020
Don't read from a closed channel because you don't have effect to share all which they are trying to show. I make a perfect mean and that was only where you demand for https://www.rushessay.com/buy-custom-essay.php. I have more things because effect of these things are ever on all others things which you have to take.
Feb 25 2020
Feb 22 2020
Feb 18 2020
The above commits from @simonsj fixed this issue.
Feb 14 2020
Feb 13 2020
Thank you for confirmation that this combination works. But lets clarify what you do -- you are sending every X minutes the ignore or keepalive messages to keep the channel open, but even though you are getting disconnects after 30 minutes. I do not think this is anything in libssh. What are you running in the channels? Port forwarding? Some long-running commands transmitting or not transmitting data? Shells? How does this disconnect look like? Could it be the default value of $TMOUT in bash? Or something on the network layer terminating long-running connections?
Thanks Jakuje , Although I am able to use the above two api's to get the status of the connection.
But even after that there is a hard reset which causes the session to be terminated after 30 mins , even though keep alive is being sent.
Feb 12 2020
Hello! Thank you a lot! You are absolutely right, idiotsandopensource and ansasaki! The problem is with mbedtls.lib. So need to wait when it will be fixed ^3^
Feb 11 2020
This is not libssh's fault. Yesterday vcpkg master changed and new master branch is broken. Only reason I know this because I was setting up vcpkg with another programmer and called it a day. Next morning I get a it no work and all our automated builds broke.
This is caused by a idiot programmer and I swear it must have happened in 48 hour window because THIS SHIT did not happen. I went to vcpkg to not have to explain open source stupid shit to other engineers that don't need to know about cmake pearl and other stupid shit.
I just use default package which coming from vcpkg. By default it's coming with mbedtls => so it's mbedcrypto.lib.
I don't use any flags cause I think that default package should work.
This is probably caused by the lack of threading support in the crypto library.
I've proposed https://gitlab.com/libssh/libssh-mirror/-/merge_requests/93 for fixing this by removing the static from those variables.
I am sorry for a delay.
Jan 30 2020
In my scenario I need to handle the response i.e if for a keepalive request I donot get a correct response . I need to terminate the session .
But going by what you wrote above " no explicit action should be needed from the calling program" , I am understanding that ssh_send_keepalive() internally calls the following sequence ssh_global_request()-> ssh_handle_packets_termination()->ssh_handle_packets() .
But I need to capture the response which ssh_send_keepalive() doesnot provide me any means to get it.
Also all the other api's like
ssh_global_request(), ssh_handle_packets_termination(), ssh_handle_packets() are not exposed to external world so I cant use it inside my code.
Jan 29 2020
ssh_handle_packets() is not an exposed api . I am unable to use it , also this macro(SSH_MSG_REQUEST_FAILURE) I cant find in the codebase of libssh . So what should I use ?
the ssh_send_keepalive() does really only the sending. But the return value is ignored since 59ada799. But if the sending failed, the session state should be modified to reflect this if I am right. The response is handled as any other message in ssh_handle_packets() if I am right. The response is anyway SSH_MSG_REQUEST_FAILURE.
I tried using ssh_send_keepalive() but it doesnot serve the purpose . Here I was monitoring the return value of the function (ssh_send_keepalive) .
I first started client and server . In my scenario server shall initiate the connection which it did and this keep alive function was set to send every 30 sec . for which the ssh_send_keepalive() was returning SSH_OK.
But when I killed the client . It was expected that the ssh_send_keepalive() should send back SSH_ERROR but instead it kept on sending back SSH_OK . This means this api is only sending the message but not monitoring the response.
I also checked in libssh code the above function always sends SSH_OK irrespective of any condition , it internally calls ssh_global_request() which is not an exposed API , so I cant use it to check.
Jan 28 2020
Please, check the RFC 4253 describing this message: https://tools.ietf.org/html/rfc4253#section-11.2
Just one query .
If we are using ssh_send_ignore . Do we get response from the client for the same ?
(Because as I understand correctly .
The ssh_send_ignore returns SSH_OK if sent successfully else error. It doesnot states
if client has received it and responded.)
Jan 27 2020
Thanks a lot @Jakuje .
I tried as per your recommendation and it works for me.
Jan 23 2020
Thanks, commit 9a10cef92086d3b22fa4acd9999cf908b7fa7e48 works.
One other possibility that could work would be TCPKeepAlive configuration option (from OpenSSH), which could handle this on TCP level (but might not work on all the networks configurations). So still, the first advice holds.
Thank you very much for tracking this down. Could you please test the latest stable-0.9 branch which includes a fix for this?