[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with ssh_userauth_list
[Thread Prev] | [Thread Next]
- Subject: Re: problems with ssh_userauth_list
- From: Tilo Eckert <tilo.eckert@xxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Fri, 5 May 2017 10:32:36 +0200
- To: libssh@xxxxxxxxxx
You did not check the return code "rc".
You could already be logged in after the ssh_userauth_none() call (e.g.
IP based auth). An error could occur (SSH_AUTH_ERROR) or if you are in
non-blocking mode SSH_AUTH_AGAIN could be returned.
Am 05.05.2017 um 10:24 schrieb Daniel Kroker:
> Hi,
>
> thanks for your reply. i call ssh_userath_none.
>
> Here is a small snippet from our program:
>
> if(!session)
>
> {
>
> qDebug()<<"Session not established";
>
> qDebug()<<"SSH Error 12: ",ssh_get_error(session);
>
> return-1;
>
> }
>
> rc=ssh_userauth_none(session,NULL);
>
> method=ssh_userauth_list(session,NULL);
>
> qDebug()<<"method: "<<QString::number(method);
>
> if(method&SSH_AUTH_METHOD_PASSWORD)
>
> { ....
>
>
>
> Am 05.05.2017 um 10:22 schrieb Tilo Eckert:
>> http://api.libssh.org/stable/group__libssh__auth.html#ga35d44897a44b4bb3b7c01108c1812a37
>>
>> You either did not call ssh_userauth_none() before or the server does
>> not allow any of the supported auth methods.
>>
>> Regards
>> Tilo
>>
>> Am 05.05.2017 um 09:26 schrieb Daniel Kroker:
>>> Hi,
>>>
>>> we have the problem that in some cases ssh_userauth_list(session,NULL);
>>> returned 0.
>>> What is 0 exacly?
>>
>
> --
> Mit freundlichen Grüßen
> Daniel Kroker
>
> VENTAS AG 20+ Jahre ERP-Erfahrung!
> Web: www.ventas.de
> Fon: 040 / 32 33 34 0
> Fax: 040 / 32 33 34 38
> Firmensitz: Neuer Wall 10, 20354 Hamburg, Deutschland
> Registergericht: Hamburg, HRB 80 297 Ust.IdNr.: DE118686712
> Vorstandsvorsitzender: Dipl. Ing. Alain Siverly
> Aufsichtsratsvorsitzender: Dr. Olaf Rehme
>
| Re: problems with ssh_userauth_list | Daniel Kroker <dk@xxxxxxxxx> |
| problems with ssh_userauth_list | Daniel Kroker <dk@xxxxxxxxx> |
| Re: problems with ssh_userauth_list | Tilo Eckert <tilo.eckert@xxxxxxx> |
| Re: problems with ssh_userauth_list | Daniel Kroker <dk@xxxxxxxxx> |