FileTransferClient.LoginAsync Method
Namespace: Rebex.Net
Assembly: Rebex.FileTransfer.dll (version 7.0.9448)
LoginAsync(String, String, Object)
Begins asynchronous Login operation. Authenticates the user to the server.
Declaration
public async Task LoginAsync(string userName, string password, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | userName | The username. |
| String | password | Password for the given username. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Implements
LoginAsync(String, String, String, Object)
Begins asynchronous Login operation. Authenticates the user to the FTP server. This method cannot be used with SFTP protocol.
Declaration
public async Task LoginAsync(string userName, string password, string account, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | userName | The username. |
| String | password | Password for the given username. |
| String | account | Account for the given username. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task | The logon message returned by the remote server. |
Remarks
Represents FTP USER/PASS/ACCT command triplet.
For anonymous logins, use "anonymous" as a username and an email as a password (and no account).
If userName is a null reference, "anonymous" is used. If password is a null reference, "guest" is used.
LoginAsync(String, String, SshPrivateKey, Object)
Begins asynchronous Login operation. Authenticates the user to the server using a combination of password and public key and initializes the SFTP session. This method cannot be used with FTP protocol.
Declaration
public async Task LoginAsync(string userName, string password, SshPrivateKey privateKey, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | userName | The username. |
| String | password | Password for the specified username. |
| SshPrivateKey | privateKey | RSA or DSA private key for key-based authentication. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Remarks
Please note that some servers don't support both password and private key specified at the same time.
LoginAsync(String, SshPrivateKey, Object)
Begins asynchronous Login operation. Authenticates the user to the server using his private key and initializes the SFTP session.
Declaration
public Task LoginAsync(string userName, SshPrivateKey privateKey, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | userName | The username. |
| SshPrivateKey | privateKey | RSA or DSA private key for key-based authentication. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
LoginAsync(SshGssApiCredentials, Object)
Authenticates to the server using GSSAPI. Kerberos (not on .NET CF) and NTLM methods are supported. This method cannot be used with FTP protocol.
Declaration
public async Task LoginAsync(SshGssApiCredentials credentials, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SshGssApiCredentials | credentials | Credentials. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Remarks
Only supported on Windows platforms.
LoginAsync(String, SshAuthenticationAgent, Object)
Asynchronously authenticates the user to the server using his private key and initializes the SFTP session. This method cannot be used with FTP protocol.
Declaration
public async Task LoginAsync(string userName, SshAuthenticationAgent sshAuthenticationAgent, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | userName | The username. |
| SshAuthenticationAgent | sshAuthenticationAgent | An instance of the SshAuthenticationAgent that holds a private key for key-based authentication. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
See Also
LoginAsync(String, String, SshAuthenticationAgent, Object)
Asynchronously authenticates the user to the server using a combination of password and public key and initializes the SFTP session. This method cannot be used with FTP protocol.
Declaration
public async Task LoginAsync(string userName, string password, SshAuthenticationAgent sshAuthenticationAgent, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | userName | The username. |
| String | password | Password for the specified username. |
| SshAuthenticationAgent | sshAuthenticationAgent | An instance of the SshAuthenticationAgent that holds a private key for key-based authentication. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Remarks
Please note that some servers don't support both password and private key specified at the same time.