fix: remove public key deployment from deploy-keys

Deploy-keys now only:
- Creates /var/lib/syncserver/ssh/keys on remote
- Uploads private keys of all other machines to that path
- Populates known_hosts with all other machine hosts

No longer touches authorized_keys or reads server public key.
This commit is contained in:
2026-07-09 20:58:48 -04:00
parent 048b99921e
commit c7337a3bbc
4 changed files with 5 additions and 40 deletions
+1 -2
View File
@@ -125,12 +125,11 @@ export interface DeployKeysResponse {
export interface DeployKeysOptions {
known_hosts_host?: string;
include_server_key?: boolean;
}
export async function deployKeys(machineId: number, options?: DeployKeysOptions): Promise<DeployKeysResponse> {
return api<DeployKeysResponse>(`/api/machines/${machineId}/deploy-keys`, {
method: 'POST',
body: options ?? { include_server_key: true },
body: options ?? {},
});
}
+1 -1
View File
@@ -217,7 +217,7 @@ export default function Machines() {
async function handleDeployKeys(m: Machine) {
setDeployModal({ machine: m, result: null, loading: true });
try {
const result = await deployKeys(m.id, { include_server_key: true });
const result = await deployKeys(m.id);
setDeployModal({ machine: m, result, loading: false });
} catch (e: unknown) {
setDeployModal({ machine: m, result: { success: false, messages: [], errors: [(e as Error).message] }, loading: false });