Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Warner is a function that gets called when the fingerprint verifier wants to show a warning. By default it prints the warning to stderr. This is a variable so you can replace it if you want to suppress or handle the warnings. Here is an example of a string that would get passed to this function:
not validating host key nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 for github.com
Functions ¶
func New ¶
func New(fingerprint string) ssh.HostKeyCallback
New returns a function matching the ssh.HostKeyCallback type that can be passed as the HostKeyCallback in the ssh ClientConfig. The fingerprint may be in the format
MD5:16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48 MD5:16:27:AC:A5:76:28:2D:36:63:1B:56:4D:EB:DF:A6:48 16:27:AC:A5:76:28:2D:36:63:1B:56:4D:EB:DF:A6:48 SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
To get a host's fingerprint run this (replace github.com with your host):
ssh-keyscan github.com | ssh-keygen -lf -
If an empty string is given this will print a warning using Warner() containing the SHA256 key.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.