Commit fb71e1e
committed
system-reinstall-bootc: SSH key handling via cloud-init detection
If cloud-init is detected in the target image:
1. Check the host for existing root SSH keys at /root/.ssh/authorized_keys.
2. If host keys exist, automatically configure inheritance via
/target/root/.ssh/authorized_keys.
3. If no host keys exist, proceed without manual interaction, trusting
cloud-init in the new system to handle key provisioning.
If cloud-init is not detected, maintain the existinginteractive behavior
to prevent user lock-out.
Ref: #1300
Signed-off-by: Terence Lee <hone02@gmail.com>1 parent a095e34 commit fb71e1e
2 files changed
+52
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
118 | 130 | | |
119 | | - | |
| 131 | + | |
120 | 132 | | |
121 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
122 | 138 | | |
123 | 139 | | |
124 | 140 | | |
125 | 141 | | |
126 | | - | |
| 142 | + | |
127 | 143 | | |
128 | 144 | | |
129 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
27 | 46 | | |
28 | 47 | | |
29 | 48 | | |
30 | | - | |
| 49 | + | |
31 | 50 | | |
32 | 51 | | |
33 | 52 | | |
| |||
88 | 107 | | |
89 | 108 | | |
90 | 109 | | |
91 | | - | |
92 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
93 | 113 | | |
94 | | - | |
95 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
96 | 117 | | |
97 | 118 | | |
98 | 119 | | |
| |||
0 commit comments