-
-
Notifications
You must be signed in to change notification settings - Fork 4
SSH.Session.SetPreferredAlgorithms
Andrew Lambert edited this page Nov 26, 2022
·
10 revisions
Sub SetPreferredAlgorithms(Type As SSH.AlgorithmType, Preferred() As String)
Name | Type | Comment |
---|---|---|
Type |
AlgorithmType | The type of algorithm. |
Preferred |
String array | A list of one or more preferred algorithms in order of priority. |
Prior to calling Session.Connect, you may use this method to specify a list of acceptable algorithms for the specified AlgorithmType
. If none of your preferred algorithms are supported by the server then the connection will fail. If any of the algorithms in the list are not supported by libssh2 then they are ignored.
Dim session As New SSH.Session
Dim prefs() As String = Array("ecdh-sha2-nistp384", "ecdh-sha2-nistp256", "rsa2048-sha256")
session.SetPreferredAlgorithms(SSH.AlgorithmType.KeyExchange, prefs)
If Not session.Connect("ssh.example.com", 22) Then
Call MsgBox("Unable to establish SSH connection.", 16, "Connection failed")
End If
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.