Subject: Re: AW: Fail to login with libshh2

Re: AW: Fail to login with libshh2

From: SIFE Abdelrazak <>
Date: Mon, 1 Nov 2010 06:47:19 -0700 (PDT)

You can say that  I read all SSH rfc's, even the old one, and to now  I didn't understand the parameter  specified with kbd_callback function from libssh2 examples.
Any way, I use this snippest to authenticate client but this apply only to a defined password, I wont to accept password from CLI and then authenticate  client.

static void kbd_callback(const char *name, int name_len,
                         const char *instruction, int instruction_len,
                         int num_prompts,
                         const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts,
                         LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses,
                         void **abstract)
    if (num_prompts == 1) {
        responses[0].text = strdup(password);
        responses[0].length = strlen(password);

Received on 2010-11-01