Is there a way with OpenSSH (
ssh) to specify the expected host key fingerprint as a command-line argument so that a connection will only be allowed if the key fingerprint sent by the server matches the one given as a command line argument ?
I am trying to provide a similar level of functionality in Windows and Posixly versions of application. On Windows, the usual SSH client is
plink (also available on Linux) which has a
--hostkey command-line option for this purpose:
$ plink -hostkey "d0:e4:ad:11:7d:6a:8c:c0:36:2b:ff:ee:16:cf:f7:46" user@host
Is that possible with the OpenSSH
ssh command ?