Skip to content

Commit b69def8

Browse files
committed
doc: os_root_authorized_keys in the schema
init.sh has always written .os_root_authorized_keys[] into /root/.ssh/authorized_keys, but the key was in no schema and no reference, so the only way to find it was to read init.sh. Key-based root login works without os_root_password; without either, the root account stays locked. Reference regenerated. Signed-off-by: Simon Walz <contact@simonwalz.de>
1 parent 3d79868 commit b69def8

2 files changed

Lines changed: 22 additions & 3 deletions

File tree

‎docs/common/system-json-reference.md‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ Schema for configuring CuOS system parameters including networking, update sourc
3535
|**keyboard\_layout**|`string`|Keyboard Layout<br/>Pattern: `^[A-Za-z]{2}$`<br/>||
3636
|**keyboard\_variant**|`string`|Keyboard Variant<br/>Pattern: `^[A-Za-z0-9_-]{1,32}$`<br/>||
3737
|**os\_root\_password**|`string`|Root Password for the operating system: local login or SSH - hash or password<br/>||
38-
|**os\_ssh\_server**|`boolean`|Activate SSH server for the operating system<br/>||
38+
|[**os\_root\_authorized\_keys**](#os_root_authorized_keys)|`string[]`|SSH public keys accepted for root login, written to /root/.ssh/authorized_keys on every boot. Key-based login works even without 'os_root_password'; without either, the root account is locked<br/>||
39+
|**os\_ssh\_server**|`boolean`|Activate SSH server for the operating system, on port 4222<br/>||
3940
|**console\_expert\_password**|`string`|Password for the expert menu of the console interface<br/>||
4041
|**console\_password**|`string`|Password for the console interface - hash or password<br/>||
4142
|**product\_name**|`string`|Product name shown in the boot menu and the installer, and used as the first part of the built artefact's file name (default: 'CuOS', or 'CuOS IaC' when the init image is a cuos-iac image)<br/>||
@@ -91,10 +92,21 @@ List of network interface configurations
9192
]
9293
```
9394

95+
 
96+
<a name="os_root_authorized_keys"></a>
97+
## os\_root\_authorized\_keys\[\]: array
98+
99+
SSH public keys accepted for root login, written to /root/.ssh/authorized_keys on every boot. Key-based login works even without 'os_root_password'; without either, the root account is locked
100+
101+
102+
**Items**
103+
104+
**Item Type:** `string` 
105+
94106
---
95107

96108
*This page is generated from [`system/cuos/system-schema.json`](../../system/cuos/system-schema.json),
97109
the schema CuOS validates `system.json` against at boot. Edit the schema, then run
98110
`npm run docs:system-json`.*
99111

100-
<!-- schema-sha256: 698f12c348ff624d6a386c0ee85565ddb894d1416b9b3664901aed9ade98ad6b -->
112+
<!-- schema-sha256: 3dd3963b27338eb8b689b7c1eec4422f3f88acac1861d970e3053b3fa9b4e708 -->

‎system/cuos/system-schema.json‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,16 @@
205205
"type": "string",
206206
"description": "Root Password for the operating system: local login or SSH - hash or password"
207207
},
208+
"os_root_authorized_keys": {
209+
"type": "array",
210+
"description": "SSH public keys accepted for root login, written to /root/.ssh/authorized_keys on every boot. Key-based login works even without 'os_root_password'; without either, the root account is locked",
211+
"items": {
212+
"type": "string"
213+
}
214+
},
208215
"os_ssh_server": {
209216
"type": "boolean",
210-
"description": "Activate SSH server for the operating system"
217+
"description": "Activate SSH server for the operating system, on port 4222"
211218
},
212219
"console_expert_password": {
213220
"type": "string",

0 commit comments

Comments
 (0)