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

RE: ssh_userauth_none crashes


HI,
Thanks Yang
I tried doing ssh_init() and It returns success.
The problem still persists.
Checked mySshSession before ssh_userauth_none  .it is still valid.

The device perfectly logs in with putty.
Could it be something to do with device permissions? The same code worked earlier. I don’t remember changing the code, Now its giving issues.
It would be great If somebody can help.

Sample code below:
ssh_init();
    ssh_options_set(mySshSession, SSH_OPTIONS_HOST, IPAddress.toStdString().c_str());
    ssh_options_set(mySshSession, SSH_OPTIONS_PORT, &port);
    ssh_options_set(mySshSession, SSH_OPTIONS_USER, User.toStdString().c_str());

    rc = ssh_connect(mySshSession);
    if (rc==SSH_OK)
    {
int rc =ssh_userauth_none(mySshSession, NULL);
    if (ssh_pki_import_pubkey_file(PublickeyFile.toStdString().c_str(), &pubkey) != SSH_OK) {
        qDebug()<<"Failed to import the key";
        return DDM_ERR;
    }
    }
    }


Best regards

Sruthi Mohan
RBEI/EIA1

Tel. +91(80)6783-7826

From: Yang Yubo [mailto:yang@xxxxxxxxxxxx]
Sent: Sunday, October 18, 2015 7:54 AM
To: libssh@xxxxxxxxxx
Subject: Re: ssh_userauth_none crashes

Did you called ssh_init() function to init libssh library?

/**
 * @brief Initialize global cryptographic data structures.
 *
 * This function should only be called once, at the beginning of the program, in
 * the main thread. It may be omitted if your program is not multithreaded.
 *
 * @returns             0 on success, -1 if an error occured.
 */
int ssh_init(void);

BR,

Yang

On Oct 18, 2015, at 10:06, Sruthi Mohan (RBEI/EIA1) <Sruthi.Mohan@xxxxxxxxxxxx<mailto:Sruthi.Mohan@xxxxxxxxxxxx>> wrote:

HI,

Attached files for SSH,
Could be hempful if you could check

From: Yang Yubo [mailto:yang@xxxxxxxxxxxx]
Sent: Friday, October 16, 2015 6:43 PM
To: libssh@xxxxxxxxxx<mailto:libssh@xxxxxxxxxx>
Subject: Re: ssh_userauth_none crashes

Hi Sruthi,

I use libssh in one of my application, didn’t ever encounter such ssh_userauth_none crash error.

It looks like some mySshSession was released or point to another memory address.

I think it would be better if you could paste full example code that can reproduce the issue.

Best

Yang

On Oct 16, 2015, at 18:59, Sruthi Mohan (RBEI/EIA1) <Sruthi.Mohan@xxxxxxxxxxxx<mailto:Sruthi.Mohan@xxxxxxxxxxxx>> wrote:

Dear sir,
I am using libssh 0.7
I have followed the following steps,
ssh_connect(mySshSession);=succesful

Known host verification ==successful

ssh_userauth_none(mySshSession, NULL);

ssh_userauth_none crashes with the error
Heap block at 27415180 modified at 27415240 past requested size of b8.

Any help would be appreciated



Best regards

Sruthi Mohan
RBEI/EIA1

Tel. +91(80)6783-7826

<myipconnect.cpp><myipconnect.h><datatypes.h>


Follow-Ups:
Re: ssh_userauth_none crashesYang Yubo <yang@xxxxxxxxxxxx>
References:
ssh_userauth_none crashes"Sruthi Mohan (RBEI/EIA1)" <Sruthi.Mohan@xxxxxxxxxxxx>
Re: ssh_userauth_none crashesYang Yubo <yang@xxxxxxxxxxxx>
RE: ssh_userauth_none crashes"Sruthi Mohan (RBEI/EIA1)" <Sruthi.Mohan@xxxxxxxxxxxx>
Re: ssh_userauth_none crashesYang Yubo <yang@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org