Skip to content

What does it mean if AuthenticationMethod has AllowedAuthentications set as null? #813

Open
@masters3d

Description

@masters3d

I have a server where I am sending password, and keyboard-interactive authentication methods. The password fails so it uses keyboard interactive.

Right after I connect I am getting the sshclient.ConnectionInfo so I can log some data.

// ConnectionInfo looks like this in ssh.net but I am interested in Authentication Methods

class ConnectionInfo {
....
public IList<AuthenticationMethod> AuthenticationMethods { get; }
...
}

This is the code that does the printing:

                // Log information about the connection authentication methods
                foreach (var eachAthenticationMethod in connectionInfo?.AuthenticationMethods ?? new List<AuthenticationMethod>())
                {
                    Log($" Strategy: {eachAthenticationMethod?.Name},  AllowedAuthentication:  {string.Join(",", eachAthenticationMethod?.AllowedAuthentications ?? (new List<string>()).ToArray())}");
                }

This is what I am printing.

Strategy: password, AllowedAuthentication: publickey,password,keyboard-interactive
Strategy: keyboard-interactive, AllowedAuthentication:

keyboard-interactive's AllowedAuthentication is null.

What does it mean if AuthenticationMethod has AllowedAuthentications set as null?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions