Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: SshPrivateKeyPassphrase and ConvertTo-SecureString

The SecureString is supported for password only, not for passphrase.

You have to decrypt the secure string yourself.
See https://stackoverflow.com/q/28352141/850848
Guest

Re: workarount

edware wrote:

Found a workaround:

$sessionOptions.SecurePassword = ConvertTo-SecureString 

$sessionOptions.SshPrivateKeyPassphrase = $sessionOptions.SecurePassword


And this works.


Now when testing on another system it is not working.
edware

workarount

Found a workaround:

$sessionOptions.SecurePassword = ConvertTo-SecureString 

$sessionOptions.SshPrivateKeyPassphrase = $sessionOptions.SecurePassword


And this works.
edware

SshPrivateKeyPassphrase and ConvertTo-SecureString

When using
SshPrivateKeyPassphrase
with a text based passphrase the powershell script works fine.
If i try to use it with:
$sessionOptions.SshPrivateKeyPassphrase = ConvertTo-SecureString


I get an error:
Connection has been unexpectedly closed. Server sent command exit status 0.