Hello everyone! II try to use the libssh2 in my application. And I have question about the libssh2_userauth_keyboard_interactive function.
I took the kbd_callback method from examples: 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 ) { (void)name; (void)name_len; (void)instruction; (void)instruction_len; if (num_prompts == 1) { responses[0].text = strdup(password); responses[0].length = strlen(password); } (void)prompts; (void)abstract; } Here, the password is a global variable. QUESTION: Is there a method to pass the variable into this function? -- Best Regards!
_______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel