dotConnect for PostgreSQL Documentation
SshStrictHostKeyChecking Property
See Also
Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : SshStrictHostKeyChecking Property

Indicates whether the host key is verified during establishing connection.


Visual Basic (Declaration) 
Public Property SshStrictHostKeyChecking As Boolean
public bool SshStrictHostKeyChecking {get; set;}

Property Value

true, if the host key is verified during establishing connection; otherwise, false.


The default value is false for compatibility with previous versions. It means that the verification of the server key, that was recieved during handshake when establishing connection is not performed. It is not recommended to use the default value, because this does not implement completely the SSH secure connection.

When this option is set totrue, the server public key is verified. The verification is successful if the server key is identical to the key, supplied by user. This key should be specified in the SshOptions.HostKey property. If this property is not set or the keys are not equal, an exception is raised and connection is not established. You can use PgSqlConnection.SshHostKeyConfirmation to handle this scenario.

You can get the public host key from system administrator. If you get only the fingerprint of the key, but not the key itself, you should subscribe for the PgSqlConnection.SshHostKeyConfirmation. The server key fingerprint and other properties will be available as the event handler parameters.


Platforms:Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8, Windows 10, Windows Server 2012 family.

See Also