From afcc33b7fb8a03ed671e91774e3c3496587e6630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=A4=A7=E7=8C=AB?= <16399091+binaricat@users.noreply.github.com> Date: Tue, 3 Mar 2026 13:59:02 +0800 Subject: [PATCH] fix: add missing passphrase to SFTP dual-pane credentials (#238) (#239) useSftpHostCredentials.ts omitted `passphrase` when building the credentials object for the target host, causing SFTP connections with passphrase-protected private keys to fail with: Error: Cannot parse privateKey: Encrypted private OpenSSH key detected, but no passphrase given The jump host path (L50) already included passphrase correctly. This adds the same pattern to the main host credentials. --- application/state/sftp/useSftpHostCredentials.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/application/state/sftp/useSftpHostCredentials.ts b/application/state/sftp/useSftpHostCredentials.ts index 203af2fc4..12450ef84 100644 --- a/application/state/sftp/useSftpHostCredentials.ts +++ b/application/state/sftp/useSftpHostCredentials.ts @@ -20,12 +20,12 @@ export const useSftpHostCredentials = ({ const proxyConfig = host.proxyConfig ? { - type: host.proxyConfig.type, - host: host.proxyConfig.host, - port: host.proxyConfig.port, - username: host.proxyConfig.username, - password: host.proxyConfig.password, - } + type: host.proxyConfig.type, + host: host.proxyConfig.host, + port: host.proxyConfig.port, + username: host.proxyConfig.username, + password: host.proxyConfig.password, + } : undefined; let jumpHosts: NetcattyJumpHost[] | undefined; @@ -63,6 +63,7 @@ export const useSftpHostCredentials = ({ password: resolved.password, privateKey: key?.privateKey, certificate: key?.certificate, + passphrase: resolved.passphrase || key?.passphrase, publicKey: key?.publicKey, keyId: resolved.keyId, keySource: key?.source,