This example demonstrates how to use the GSSAPI NTLM authentication mechanism if the server supports it.
// Create a new class instance. using (Sftp client = new Sftp()) { // Connect to the SFTP server. client.Connect("myserver"); // Initialize GSSAPI for NTLM single sign-on SecureShellGssApiCredentials credentials = new SecureShellGssApiCredentials(); credentials.SetMechanisms(SecureShellGssApiMechanisms.Ntlm); // Log in using NTLM single sign-on client.Authenticate(credentials); // ... }
// Create a new class instance. using (Sftp client = new Sftp()) { // Connect to the SFTP server. client.Connect("myserver"); // Initialize GSSAPI for NTLM single sign-on SecureShellGssApiCredentials credentials = new SecureShellGssApiCredentials(authUsername, authApiPassword, authDomain); credentials.SetMechanisms(SecureShellGssApiMechanisms.Ntlm); // Log in using NTLM client.Authenticate(credentials); // ... }