Allow host or [host]:port when checking host keys
Allow host or [host]:port when checking host keys

When using ncclient with a non-standard SSH port, only entries in
known_hosts where the port has explicitly been set are checked. This
differs from openSSHs handling of host keys where an entry with just the
host name / ip is also checked if an entry without the port is not
present.

For example, with a known host of:

10.0.0.1 ecdsa-sha2-nistp256 <redacted>

I could still connect with ssh -p 830 10.0.0.1, but with ncclient I
would need:

[10.0.0.1]:830 ecdsa-sha2-nistp256 <redacted>

This patch checks for known host keys matching either 'host' or
'[host]:port', to match the behaviour of OpenSSH.

Fixes: 302

nwautomator/ncclient,ncclient/ncclient,earies/ncclient