The Maverick.NET SSH API

HostKeyVerification Interface

This interface provides a callback method so that the user can verify the identity of the server (by checking the public key) during the initial protocol negotiation.

For a list of all members of this type, see HostKeyVerification Members.

[Visual Basic]
Public Interface HostKeyVerification
[C#]
public interface HostKeyVerification

Types that implement HostKeyVerification

Type Description
AbstractKnownHostsKeyVerification This class provides an abstract HostKeyVerification implementation which checks SSH host keys against the OpenSSH known_hosts file format.
ConsoleKnownHostsKeyVerification This class provides an implementation of AbstractKnownHostsKeyVerification for obtaining a user response directly from the console.

Remarks

This check is performed at the beginning of each connection to prevent trojan horses (by routing or DNS spoofing) and man-in-the-middle attacks. The user should verify that the key is acceptable; the most usual method being a local database file called known_hosts. The core Maverick.NET engine does not enforce any specific host key verification implementation.

class SimpleHostKeyVerification : HostKeyVerification
{
    public bool VerifyHost(String hostname, SSHPublicKey key)
    {
        return true;
    }
}

// Then to configure before establishing a connection

SSHConnector con = SSHConnector.Create();
con.KnownHosts = new SimpleHostKeyVerification();

Requirements

Namespace: Maverick.SSH

Assembly: Maverick.NET (in Maverick.NET.dll)

See Also

HostKeyVerification Members | Maverick.SSH Namespace