Subject: Keyboard Interactive

Keyboard Interactive

From: Robert M. Münch <>
Date: Sat, 9 Apr 2011 21:07:17 +0200

Hi, just digging through the examples and found this one here:

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);
} /* kbd_callback */

I really don't understand what this callback should do. Can anyone please enlighten me?

Robert M. Münch


Received on 2011-04-09