[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Authentication via none is blocking thread.
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: Re: Authentication via none is blocking thread.
- From: Jakub Jelen <jjelen@xxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 12 Jun 2024 09:45:40 +0200
- To: libssh@xxxxxxxxxx
The session is blocking by default. You can set it to non-blocking mode with ssh_set_blocking(session, 0): https://api.libssh.org/stable/group__libssh__session.html#ga2a29cff08855611be84d050e5bec73bc But in that case you will have to handle the SSH_AGAIN return codes, retry and handle timeouts on your own. But given the server responds to other authentication methods, but not this one, I assume this will be something wrong with the server. In any case, debug logs would help to troubleshoot this issue. Jakub On Wed, Jun 12, 2024 at 8:32 AM Bhautik Radadiya <radadiyabhautik55@xxxxxxxxx> wrote: > > Hi , > `ssh_userauth_none()` will not work when session in bloc king? > If that is the case then how we can make session non-blocking? > > Regards > Bhautik > > On Mon, Jun 10, 2024, 3:51 PM Bhautik Radadiya <radadiyabhautik55@xxxxxxxxx> wrote: >> >> Hi, >> We are trying to logged in ciena3926m device via passwd but failed then tried via ssh_userauth_publickey that also fail so, last tried via none and we didn't get handle back to thread. >> This we have seen intermittently but we are trying to understand why it's blocking sometimes. >> >> 1. How to set session as non-block?? >> >> Regards >> Bhautik >> >> On Mon, Jun 10, 2024, 3:40 PM Jakub Jelen <jjelen@xxxxxxxxxx> wrote: >>> >>> Hi, >>> The `ssh_userauth_none()` should work when the session is set to >>> non-blocking. On the first sight I do not see any significant >>> difference from other authentication functions. Do you have a >>> backtrace, where the code is blocking? Do you have a minimal >>> reproducer? What is the server? >>> >>> Jakub >>> >>> On Mon, Jun 10, 2024 at 8:42 AM Bhautik Radadiya >>> <radadiyabhautik55@xxxxxxxxx> wrote: >>> > >>> > Hi All, >>> > Hope you all are well and doing well. >>> > I am facing authentication issue sometimes when we are trying to authenticate via ssh_userauth_none >>> > and it blocks the thread and we never gets the handle back to thread. >>> > >>> > 1. What could be the problem? >>> > 2. Is ssh_userauth_none is blocking API?? >>> > 3. Is there any alternate API to authenticate via none?? >>> > >>> > Please let me know if i am missing something or any information you need from me. >>> > Thanks in advance for your help. >>> > >>> > Regards >>> > Bhautik >>> > >>> >>>
Authentication via none is blocking thread. | Bhautik Radadiya <radadiyabhautik55@xxxxxxxxx> |
Re: Authentication via none is blocking thread. | Jakub Jelen <jjelen@xxxxxxxxxx> |
Re: Authentication via none is blocking thread. | Bhautik Radadiya <radadiyabhautik55@xxxxxxxxx> |
Re: Authentication via none is blocking thread. | Bhautik Radadiya <radadiyabhautik55@xxxxxxxxx> |