Back to product page

AuthChallenge property


Holds challenge for keyboard-interactive authentication.

Type

A String value.

Syntax

  • Basic
object.AuthChallenge [= value]  
The AuthChallenge(object,value) syntax has these parts:
objectAn expression evaluating to an object of type SSHUser.
valueA String value.

Remarks

When this property is set, wodSSHServer will not accept password authentication, but will require user to respond to keyboard-interactive authentication instead.

When keyboard-interactive authentication is used, server sends one or more challenges to the user, and user is required to provide response to all of them. You should set up this property with text description of each challenge, one challenge per line (separated with CRLF sequences). When user tries to authenticate, LoginPassword LoginPassword property is fired, where Password argument contains his replies, one response per line (separated with CRLF sequences) which you can evaluate and decide if you will set Action argument to Allow or Deny.

If AuthChallenge property is empty, regular password authentication is expected to be provided from the user (assuming Authentication property is set to expect it).

For example, you can have code like this:
 
Private Sub wodSSHD1_Connecting(ByVal User As wodSSHDComLIB.ISSHUser, Action As wodSSHDComLIB.SSHActions)
       User.AuthChallenge = "Enter your password" & vbCrLf & "Enter shared secret word"
End Sub
 
Private Sub wodSSHD1_LoginPassword(ByVal User As wodSSHDComLIB.ISSHUser, ByVal Login As String, ByVal Password As String, Action As wodSSHDComLIB.SSHActions)
       Action = Deny
 
       ' this is really simplified!
       If Login = "joe" And Password = "test124" & vbCrLf & "sharedword" Then
               Action = Allow
       End If
End Sub
 


Platforms

Windows