Sftp.LoginAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Sftp.dll (version 7.0.9448)
LoginAsync(Object)
Begins asynchronous Login operation. Authenticates the user to the server interactively and initializes the SFTP session. Uses AuthenticationRequest event to request credentials.
Declaration
public Task LoginAsync(object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
LoginAsync(String, Object)
Begins asynchronous Login operation. Authenticates the user to the server interactively and initializes the SFTP session. Uses AuthenticationRequest event to request credentials.
Declaration
public Task LoginAsync(string userName, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | userName | The username (optional). |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
LoginAsync(String, String, Object)
Begins asynchronous Login operation. Authenticates the user to the server and initializes the SFTP session.
Declaration
public Task LoginAsync(string userName, string password, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | userName | The username. |
| String | password | Password for the specified username. |
| Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
| Type | Description |
|---|---|
| Task |
Implements
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(String, SshAuthenticationAgent, 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, 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)
Begins asynchronous Login operation. Authenticates the user to the server using a combination of password and public key and initializes the SFTP session.
Declaration
public 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.
See Also
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.
Declaration
public 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(SshGssApiCredentials, Object)
Begins asynchronous Login operation. Authenticates to the server using GSSAPI. Kerberos is only supported on Mono. NTLM is supported on Windows and partially on Mono.
Declaration
public 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 |