1 module ietf-ssh-common {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-ssh-common";
6 import iana-ssh-encryption-algs {
9 "RFC EEEE: YANG Groupings for SSH Clients and SSH Servers";
12 import iana-ssh-key-exchange-algs {
15 "RFC EEEE: YANG Groupings for SSH Clients and SSH Servers";
18 import iana-ssh-mac-algs {
21 "RFC EEEE: YANG Groupings for SSH Clients and SSH Servers";
24 import iana-ssh-public-key-algs {
27 "RFC EEEE: YANG Groupings for SSH Clients and SSH Servers";
30 import ietf-crypto-types {
33 "RFC AAAA: YANG Data Types and Groupings for Cryptography";
36 import ietf-keystore {
39 "RFC CCCC: A YANG Data Model for a Keystore";
43 "IETF NETCONF (Network Configuration) Working Group";
46 "WG Web: https://datatracker.ietf.org/wg/netconf
47 WG List: NETCONF WG list <mailto:netconf@ietf.org>
48 Author: Kent Watsen <mailto:kent+ietf@watsen.net>
49 Author: Gary Wu <mailto:garywu@cisco.com>";
52 "This module defines a common features and groupings for
55 Copyright (c) 2023 IETF Trust and the persons identified
56 as authors of the code. All rights reserved.
57 Redistribution and use in source and binary forms, with
58 or without modification, is permitted pursuant to, and
59 subject to the license terms contained in, the Revised
60 BSD License set forth in Section 4.c of the IETF Trust's
61 Legal Provisions Relating to IETF Documents
62 (https://trustee.ietf.org/license-info).
64 This version of this YANG module is part of RFC EEEE
65 (https://www.rfc-editor.org/info/rfcEEEE); see the RFC
66 itself for full legal notices.
68 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
69 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
70 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
71 are to be interpreted as described in BCP 14 (RFC 2119)
72 (RFC 8174) when, and only when, they appear in all
73 capitals, as shown here.";
79 "RFC EEEE: YANG Groupings for SSH Clients and SSH Servers";
84 feature ssh-x509-certs {
86 "X.509v3 certificates are supported for SSH.";
88 "RFC 6187: X.509v3 Certificates for Secure Shell
92 feature transport-params {
94 "SSH transport layer parameters are configurable.";
97 feature public-key-generation {
99 "Indicates that the server implements the
100 'generate-public-key' RPC.";
105 grouping transport-params-grouping {
107 "A reusable grouping for SSH transport parameters.";
109 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol";
112 "Parameters regarding host key.";
113 leaf-list host-key-alg {
115 base sshpka:public-key-alg-base;
119 "Acceptable host key algorithms in order of decreasing
122 If this leaf-list is not configured (has zero elements)
123 the acceptable host key algorithms are implementation-
126 "RFC EEEE: YANG Groupings for SSH Clients and SSH Servers";
129 container key-exchange {
131 "Parameters regarding key exchange.";
132 leaf-list key-exchange-alg {
134 base sshkea:key-exchange-alg-base;
138 "Acceptable key exchange algorithms in order of decreasing
141 If this leaf-list is not configured (has zero elements)
142 the acceptable key exchange algorithms are implementation
146 container encryption {
148 "Parameters regarding encryption.";
149 leaf-list encryption-alg {
151 base sshea:encryption-alg-base;
155 "Acceptable encryption algorithms in order of decreasing
158 If this leaf-list is not configured (has zero elements)
159 the acceptable encryption algorithms are implementation
165 "Parameters regarding message authentication code (MAC).";
168 base sshma:mac-alg-base;
172 "Acceptable MAC algorithms in order of decreasing
175 If this leaf-list is not configured (has zero elements)
176 the acceptable MAC algorithms are implementation-
182 // Protocol-accessible Nodes
184 rpc generate-public-key {
185 if-feature "public-key-generation";
187 "Requests the device to generate an public key using
188 the specified key algorithm.";
191 type sshpka:public-key-algorithm-ref;
194 "The algorithm to be used when generating the key.";
199 "Specifies the number of bits in the key to create.
200 For RSA keys, the minimum size is 1024 bits and
201 the default is 3072 bits. Generally, 3072 bits is
202 considered sufficient. DSA keys must be exactly 1024
203 bits as specified by FIPS 186-6. For ECDSA keys, the
204 'bits' value determines the key length by selecting
205 from one of three elliptic curve sizes: 256, 384 or
206 521 bits. Attempting to use bit lengths other than
207 these three values for ECDSA keys will fail. ECDSA-SK,
208 Ed25519 and Ed25519-SK keys have a fixed length and
209 the 'bits' value, if specified, will be ignored.";
211 "FIPS 186-6: Digital Signature Standard (DSS)";
213 choice private-key-encoding {
216 "A choice amongst optional private key handling.";
218 if-feature "ct:encrypted-private-keys";
222 "Indicates that the private key is to be returned
223 as a cleartext value.";
227 if-feature "ct:encrypted-private-keys";
228 container encrypt-with {
230 "Indicates that the key is to be encrypted using
231 the specified symmetric or asymmetric key.";
232 uses ks:encrypted-by-choice-grouping;
236 if-feature "ct:hidden-private-keys";
240 "Indicates that the private key is to be hidden.
242 Unlike the 'cleartext' and 'encrypt' options, the
243 key returned is a placeholder for an internally
244 stored key. See the 'Support for Built-in Keys'
245 section in RFC CCCC for information about hidden
252 uses ct:asymmetric-key-pair-grouping;
254 } // end generate-public-key