Back to product page

LoginChallenge event


Fires when remote server requires keyboard-interactive authentication.

Syntax

  • Basic
Private Sub object_LoginChallenge(Challenge, Response)
The LoginChallenge(object,Challenge,Response) syntax has these parts:
objectA wodSSH object.
ChallengeA String value. Holds challenge text sent by the server.
ResponseA String value. You should set it to a value that responds to the server's challenge. Usually this is your password.

Remarks

This event can be fired only for SSH2 protocol. It gives you the ability to authenticate with the server using an "interactive" session. The Server will send some challenge text, you must reply with the correct responses to successfully authenticate.

A typical scenario is where the server sends challenge "user's password:" and you should put your password in the Response argument. However, the server may require various forms of authentication, such as various tokens, security devices etc.. Lately, many servers have removed "password" authentication completely, allowing only "keyboard-interactive" authentication to be used, even though they only expect users to enter just their password.

You should print Challenge on the screen and ask for a Response when you use this event.

If you don't use this event, but the server still requires this type of authentication, the server will use the value from the Password property - line by line for each challenge that the server sends. Since there is usually only one challenge, you will be able to login without using this event.

"keyboard-interactive" is used when the Authentication property is set to authKeyboardInteractive or authPassword.

Platforms

Windows