Skip to content

SSH.KnownHosts.AddHost

Andrew Lambert edited this page Nov 26, 2022 · 3 revisions

SSH.KnownHosts.AddHost

Method Signatures

 Sub AddHost(ActiveSession As SSH.Session, Comment As String = "")
 Sub AddHost(Host As String, Port As Integer = 0, Key As MemoryBlock, Comment As MemoryBlock, Type As Integer)

Parameters

AddHost(SSH.Session, String)

Name Type Comment
Session SSH.Session The session whose host+key are to be added.
Comment String An optional comment.

AddHost(String, Integer, MemoryBlock, MemoryBlock, Integer)

Name Type Comment
Host String The IP address or hostname to add.
Port Integer If specified, the non-default port to associate with the host+key.
Key MemoryBlock The host's key.
Comment MemoryBlock An optional comment.
Type Integer A bitmask indicating the type and encoding of the host+key.

Remarks

Adds the specified host+key to the list of known hosts if it is not already present.

Clone this wiki locally