public ISSHHostKeyInformationProvider GetSSHHostKeyInformationProvider()
{
if (HostName == null) {
throw new InvalidOperationException("HostName is null.");
}
if (HostKey == null) {
throw new InvalidOperationException("HostKey is null.");
}
return new SSH2HostKeyInformationProvider(HostName, PortNumber, HostKey);
}