Skip to content

SSH.Session.GetAuthenticationMethods

Andrew Lambert edited this page Nov 26, 2022 · 12 revisions

SSH.Session.GetAuthenticationMethods

Method Signature

 Function GetAuthenticationMethods(Username As String) As String()

Parameters

Name Type Comment
Username String The username to get authentication methods for.

Return value

Returns an array of accepted authentication methods.

Remarks

Query the remote server for a list of authentication methods that the Username is eligible to use. Note that most server implementations do not permit different usernames between requests. Therefore this must be the same username you will use on later SendCredentials() calls.

In the unlikely event that the server allows the user to log on without authenticating, calling this method will successfully log the user on and the returned list will be empty. Consequently an empty return value is not necessarily an error. You can check the IsAuthenticated property to determine whether you're actually authenticated.

Clone this wiki locally