PowerShell script failing at PW.
I'm trying to connect with an SSH key that has a password. But when I do, I get an authentication error. The log shows the following.
I have tried setting the
What is it that I'm doing wrong here?
2020-07-27 08:31:28.595 Reading key file "C:\privatekey.ppk"
! 2020-07-27 08:31:28.595 Using username "ftpuser".
. 2020-07-27 08:31:28.663 Server offered these authentication methods: publickey
. 2020-07-27 08:31:28.663 Offered public key
. 2020-07-27 08:31:28.751 Offer of public key accepted
! 2020-07-27 08:31:28.751 Authenticating with public key "rsa-key-20200715"
. 2020-07-27 08:31:28.752 Prompt (passphrase, "SSH key passphrase", <no instructions>, "Passphrase for key "rsa-key-20200715": ")
. 2020-07-27 08:31:28.752 Disconnected: Unable to authenticate
I have tried setting the
SecurePassword
using something I found in this forum, that converted my password to an encrypted string, and then users the PowerShell cmdlet ConvetTo-SecurtString
.
SecurePassword = ConvertTo-SecureString "01000000d08c9ddf0115d1118c7a00c04fc297eb010000005a2b8b613959be41820c3173f2f1747f0000000002000000000003660000c0000000100000000ce202515e9aa5c418a7033a7d98c7670000000004800000a0000000100000009807e634b97d7a9b2328a67ee9eded971800000050278f43596aa487d72a4b97ec0598589f7520db7f8c5a3914000000d4829d826564e15abccexxxxxxxxxxxxxxxxxxxx"
What is it that I'm doing wrong here?