Skip to content

Commit 59a2b29

Browse files
committed
accept v2 field names for ssh and image endpoints
1 parent df7178d commit 59a2b29

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/lib/nodes/ssh.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ Examples:
147147
return;
148148
}
149149

150-
const sshHostname = data.ssh_hostname;
151-
const sshPort = data.ssh_port;
152-
const sshHostKeys = data.ssh_host_keys || [];
150+
const sshHostname = data.hostname ?? data.ssh_hostname;
151+
const sshPort = data.port ?? data.ssh_port;
152+
const sshHostKeys = data.host_keys ?? data.ssh_host_keys ?? [];
153153

154154
let sshDestination = sshHostname;
155155
if (sshUsername !== undefined) {
@@ -168,7 +168,7 @@ Examples:
168168
knownHostsCommand = knownHostsCommand.concat([
169169
hostKeyAlias,
170170
sshHostKey.key_type,
171-
sshHostKey.base64_encoded_key,
171+
sshHostKey.key ?? sshHostKey.base64_encoded_key,
172172
]);
173173
}
174174
// Escape all characters for proper pass through

0 commit comments

Comments
 (0)