Authenticates the user to the server using a combination of password and public key and initializes the SFTP session.

Namespace:  Rebex.Net
Assembly:  Rebex.Sftp (in Rebex.Sftp.dll)

Syntax

Visual Basic
Public Sub Login ( _
	userName As String, _
	password As String, _
	privateKey As SshPrivateKey _
)
C#
public void Login(
	string userName,
	string password,
	SshPrivateKey privateKey
)

Parameters

userName
Type: System..::..String
The username.
password
Type: System..::..String
Password for the specified username.
privateKey
Type: Rebex.Net..::..SshPrivateKey
RSA or DSA private key for key-based authentication.

Remarks

Please note that some servers don't support both password and private key specified at the same time.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also