[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Protocol error: expected packet type 50, got 90


"ssh_packet_userauth_failure: Access denied" is a result of
ssh_userauth_none.

Then,
ssh_userauth_password returns SSH_AUTH_SUCCESS:

ssh_packet_userauth_pk_ok: Received
SSH_USERAUTH_PK_OK/INFO_REQUEST/GSSAPI_RESPONSE
ssh_packet_userauth_pk_ok: Assuming SSH_USERAUTH_PK_OK

Am I wrong?

Of couse, I do basic checking:

res = ssh_userauth_password(m_Session, 0, password.c_str())
SSH_CHECK(res == SSH_AUTH_SUCCESS, ...);

m_Channel = ssh_channel_new(m_Session);
SSH_CHECK(m_Channel != 0, ...);

res = ssh_channel_open_session(m_Channel);
SSH_CHECK(res == SSH_OK, ...);

2016-08-24 16:46 GMT+03:00 Andreas Schneider <asn@xxxxxxxxxxxxxx>:

> On Wednesday, 24 August 2016 16:25:16 CEST Yanis Kurganov wrote:
> > libssh 0.7.2 -> Cisco SSH Server.
> > Any suggestions are welcome!
> > Log file attached.
> >
> > Code looks like this:
> >
> > if (ssh_userauth_none(m_Session, 0) != SSH_AUTH_SUCCESS)
> >      ssh_userauth_password(m_Session, 0, password.c_str())
> >
> > m_Channel = ssh_channel_new(m_Session);
> > ssh_channel_open_session(m_Channel);
>
>
> From your log file:
>
> ssh_packet_userauth_failure: Access denied.
> ssh_packet_userauth_failure: Access denied.
>
> It should say:
>
> ssh_packet_userauth_success:  Authentication successful
>
> Maybe start with checking return codes, we provide them for a reason ...
>
>
>         -- andreas
>
>
> --
> Andreas Schneider                   GPG-ID: CC014E3D
> www.cryptomilk.org                asn@xxxxxxxxxxxxxx
>
>

References:
Protocol error: expected packet type 50, got 90Yanis Kurganov <yanis.kurganov@xxxxxxxxx>
Re: Protocol error: expected packet type 50, got 90Andreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org