1ssh_client_key_api(3) Erlang Module Definition ssh_client_key_api(3)
2
3
4
6 ssh_client_key_api -
7 -behaviour(ssh_client_key_api).
8
9
11 Behavior describing the API for public key handling of an SSH client.
12 By implementing the callbacks defined in this behavior, the public key
13 handling of an SSH client can be customized. By default the ssh appli‐
14 cation implements this behavior with help of the standard OpenSSH
15 files, see the ssh(6) application manual.
16
18 client_key_cb_options() =
19 [{key_cb_private, term()} | ssh:client_option()]
20
21 Options provided to ssh:connect/[3,4].
22
23 The option list given in the key_cb option is available with the
24 key key_cb_private.
25
27 Module:add_host_key(HostNames, PublicHostKey, ConnectOptions) -> ok |
28 {error, Reason}
29
30 Types:
31
32 HostNames = string()
33 Description of the host that owns the PublicHostKey.
34 PublicHostKey = public_key:public_key()
35 Of ECDSA keys, only the Normally an RSA, DSA or ECDSA pub‐
36 lic key, but handling of other public keys can be added.
37 ConnectOptions = client_key_cb_options()
38
39 Adds a host key to the set of trusted host keys.
40
41 Module:is_host_key(Key, Host, Algorithm, ConnectOptions) -> Result
42
43 Types:
44
45 Key = public_key:public_key()
46 Normally an RSA, DSA or ECDSA public key, but handling of
47 other public keys can be added.
48 Host = string()
49 Description of the host.
50 Algorithm = ssh:pubkey_alg()
51 Host key algorithm.
52 ConnectOptions = client_key_cb_options()
53 Result = boolean()
54
55 Checks if a host key is trusted.
56
57 Module:user_key(Algorithm, ConnectOptions) -> {ok, PrivateKey} |
58 {error, Reason}
59
60 Types:
61
62 Algorithm = ssh:pubkey_alg()
63 Host key algorithm.
64 ConnectOptions = client_key_cb_options()
65 PrivateKey = public_key:private_key()
66 Private key of the user matching the Algorithm.
67 Reason = term()
68
69 Fetches the users public key matching the Algorithm.
70
71 Note:
72 The private key contains the public key.
73
74
75
76
77Ericsson AB ssh 4.7.6 ssh_client_key_api(3)