Renci.SshNet.ConnectionInfo.Authenticate C# (CSharp) Method

Authenticate() private method

Authenticates the specified session.
is null. is null. No suitable authentication method found to complete authentication, or permission denied.
private Authenticate ( ISession session, IServiceFactory serviceFactory ) : void
session ISession The session to be authenticated.
serviceFactory IServiceFactory The factory to use for creating new services.
return void
        internal void Authenticate(ISession session, IServiceFactory serviceFactory)
        {
            if (serviceFactory == null)
                throw new ArgumentNullException("serviceFactory");

            IsAuthenticated = false;
            var clientAuthentication = serviceFactory.CreateClientAuthentication();
            clientAuthentication.Authenticate(this, session);
            IsAuthenticated = true;
        }