-behaviour(ssh_client_key_api).
Behavior describing the API for public key handling of an SSH client. By implementing
the callbacks defined in this behavior, the public key handling of an SSH client can
be customized. By default the ssh
application implements this behavior
with help of the standard OpenSSH files,
see the ssh(6) application manual.
Types
client_key_cb_options() =
[{key_cb_private, term()} | ssh:client_option()]
Options provided to ssh:connect/[3,4].
The option list given in the
key_cb
option is available with the key key_cb_private
.
Functions
HostNames = string()
PublicHostKey = public_key:public_key()
ConnectOptions = client_key_cb_options()
PublicHostKey
.Adds a host key to the set of trusted host keys.
Key = public_key:public_key()
Host = string()
Algorithm = ssh:pubkey_alg()
ConnectOptions = client_key_cb_options()
Result = boolean()
Checks if a host key is trusted.
Algorithm = ssh:pubkey_alg()
ConnectOptions = client_key_cb_options()
PrivateKey = public_key:private_key()
Reason = term()
Algorithm
.Fetches the users public key matching the Algorithm
.
Note!
The private key contains the public key.