-
-
Notifications
You must be signed in to change notification settings - Fork 4
SSH.Session.SendCredentials
Function SendCredentials(Username As String, PublicKey As FolderItem, PrivateKey As FolderItem, PrivateKeyPassword As String) As Boolean
Function SendCredentials(Username As String, PublicKey As MemoryBlock, PrivateKey As MemoryBlock, PrivateKeyPassword As String) As Boolean
Function SendCredentials(Username As String, Agent As SSH.Agent, KeyIndex As Integer) As Boolean
Function SendCredentials(Username As String, Key As SSH.AgentKey) As Boolean
Function SendCredentials(Username As String, Password As String) As Boolean
Name | Type | Comment |
---|---|---|
Username |
String | The username to authenticate with. |
PublicKey |
FolderItem | A file containing the user's public key. (Can be Nil ) |
PrivateKey |
FolderItem | A file containing the user's private key. |
PrivateKeyPassword |
String | The password used to unlock the PrivateKey . |
Name | Type | Comment |
---|---|---|
Username |
String | The username to authenticate with. |
PublicKey |
MemoryBlock | A memory block containing the user's public key. (Can be Nil ) |
PrivateKey |
MemoryBlock | A memory block containing the user's private key. |
PrivateKeyPassword |
String | The password used to unlock the PrivateKey . |
Name | Type | Comment |
---|---|---|
Username |
String | The username to authenticate with. |
Agent |
SSH.Agent | An instance of SSH.Agent. |
KeyIndex |
Integer | The index of the key which the agent should authenticate the session with. |
Name | Type | Comment |
---|---|---|
Username |
String | The username to authenticate with. |
Key |
SSH.AgentKey | An AgentKey which the agent should authenticate the session with. |
Name | Type | Comment |
---|---|---|
Username |
String | The username to authenticate with. |
Password |
String | The password to authenticate with. |
Returns True
if the user was successfully authenticated.
Sends the user's credentials to the server. You may call this method again with different key or password parameters if authentication fails, but note that most server implementations do not permit different usernames between requests.
SSH2 private keys have no standard format. ssh.com uses one format, OpenSSH has an older and a newer format, PuTTY uses yet another, etc. In libssh2 keys must use the (older) OpenSSH format. You will need to convert your key if it is stored in a different format.
If libssh2 was built with libcrypto then the public key can be derived from the private key, and is therefore optional (pass Nil
instead.)
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2018-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.