SSHKeyboardInteractive Event

Fired when the class receives a request for user input from the server.


ANSI (Cross Platform)
virtual int FireSSHKeyboardInteractive(SFTPSSHKeyboardInteractiveEventParams *e);
typedef struct {
const char *Name;
const char *Instructions;
const char *Prompt;
char *Response;
int EchoResponse; int reserved; } SFTPSSHKeyboardInteractiveEventParams; Unicode (Windows) virtual INT FireSSHKeyboardInteractive(SFTPSSHKeyboardInteractiveEventParams *e);
typedef struct {
LPCWSTR Instructions;
LPWSTR Response;
BOOL EchoResponse; INT reserved; } SFTPSSHKeyboardInteractiveEventParams;
- (void)onSSHKeyboardInteractive:(NSString*)name :(NSString*)instructions :(NSString*)prompt :(NSString**)response :(BOOL)echoResponse;

virtual INT IPWORKSSFTP_CALL FireSSHKeyboardInteractive(LPSTR &lpszName, LPSTR &lpszInstructions, LPSTR &lpszPrompt, LPSTR &lpszResponse, BOOL &bEchoResponse);


SSHKeyboardInteractive is fired during the user authentication stage of the SSH logon process. During authentication, the class will request a list of available authentication methods for the SSHUser. For example, if the SSHHost responds with "keyboard-interactive", the class will fire this event to allow the client application to set the password.

During authentication, the SSH server may respond with a request for the user's authentication information. Name is a server-provided value associated with the authentication method such as "CRYPTOCard Authentication". Instructions will contain specific instructions, also supplied by the server, for how the user should respond.

Along with these values, the server will also send at least one input Prompt to be displayed to and filled out by the user. Response should be set to the user's input, and will be sent back in the user authentication information response. EchoResponse is a server recommendation for whether or not the user's response should be echoed back during input.

Note: the server may send several prompts in a single packet. The class will fire the SSHKeyboardInteractive event once for each prompt.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks SFTP 2020 C++ Edition - Version 20.0 [Build 8162]