Support passphrase-protected SSH identity files on non-CLI clients

This commit is contained in:
2024-12-28 15:09:17 -05:00
parent 1b9237af0b
commit a4a39a3a99
8 changed files with 22 additions and 35 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ func GetSSHClient(manualSync bool) (*ssh.Client, string, bool) {
if keyFileProtected != "true" {
parsedKey, err = ssh.ParsePrivateKey(key)
} else {
parsedKey, err = ssh.ParsePrivateKeyWithPassphrase(key, inputKeyFilePassphrase())
parsedKey, err = ssh.ParsePrivateKeyWithPassphrase(key, core.PassphraseInputFunction("Enter passphrase for your SSH keyfile:"))
}
if err != nil {
fmt.Println(core.AnsiError+"Sync failed - Unable to parse private key:", keyFile+core.AnsiReset)