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 Type definitions that are used more than once in this module, or
19 abstractions to indicate the intended use of the data type, or both.
20 For more details on public key data types, refer to Section 2 Public
21 Key Records in the public_key user's guide:
22
23 boolean() =:
24 true | false
25
26 string() =:
27 [byte()]
28
29 public_key() =:
30 #'RSAPublicKey'{} | {integer(),#'Dss-Parms'{}} |
31 {#'ECPoint'{},{namedCurve,Curve::string()}}
32
33 private_key() =:
34 #'RSAPrivateKey'{} | #'DSAPrivateKey'{} | #'ECPrivateKey'{}
35
36 public_key_algorithm() =:
37 'ssh-rsa' | 'ssh-dss' | 'rsa-sha2-256' | 'rsa-sha2-384' | 'rsa-
38 sha2-512' | 'ecdsa-sha2-nistp256' | 'ecdsa-sha2-nistp384' | 'ecdsa-
39 sha2-nistp521'
40
42 Module:add_host_key(HostNames, Key, ConnectOptions) -> ok | {error,
43 Reason}
44
45 Types:
46
47 HostNames = string()
48 Description of the host that owns the PublicKey.
49 Key = public_key()
50 Normally an RSA, DSA or ECDSA public key, but handling of
51 other public keys can be added.
52 ConnectOptions = proplists:proplist()
53 Options provided to ssh:connect/[3,4]. The option list
54 given in the key_cb option is available with the key
55 key_cb_private.
56 Reason = term().
57
58 Adds a host key to the set of trusted host keys.
59
60 Module:is_host_key(Key, Host, Algorithm, ConnectOptions) -> Result
61
62 Types:
63
64 Key = public_key()
65 Normally an RSA, DSA or ECDSA public key, but handling of
66 other public keys can be added.
67 Host = string()
68 Description of the host.
69 Algorithm = public_key_algorithm()
70 Host key algorithm.
71 ConnectOptions = proplists:proplist()
72 Options provided to ssh:connect/[3,4]. The option list
73 given in the key_cb option is available with the key
74 key_cb_private.
75 Result = boolean()
76
77 Checks if a host key is trusted.
78
79 Module:user_key(Algorithm, ConnectOptions) -> {ok, PrivateKey} |
80 {error, Reason}
81
82 Types:
83
84 Algorithm = public_key_algorithm()
85 Host key algorithm.
86 ConnectOptions = proplists:proplist()
87 Options provided to ssh:connect/[3,4]. The option list
88 given in the key_cb option is available with the key
89 key_cb_private.
90 PrivateKey = private_key()
91 Private key of the user matching the Algorithm.
92 Reason = term()
93
94 Fetches the users public key matching the Algorithm.
95
96 Note:
97 The private key contains the public key.
98
99
100
101
102Ericsson AB ssh 4.6.9.4 ssh_client_key_api(3)