Cannot login to site with Passphrase
Hi I'm using WinSCP 5.9.5.0
I've made a script to download some files from a remote site which uses a private key and a passphrase.
The Winscp part of the script is
{
# Load WinSCP .NET assembly
Add-Type -Path "E:\location\WinSCPnet.dll"
# Setup session options
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
Protocol = [WinSCP.Protocol]::Sftp
HostName = "data.xxxxxxxxxx.com"
UserName = "my username"
PrivateKeyPassphrase = "*P,7$+Y#}^k@^"
SshPrivateKeyPath = "E:\location\bdl.ppk"
SshHostKeyFingerprint = "ssh-rsa 1024 the fingerprint"
}
And when I run the script I'm getting
Member "PrivateKeyPassphrase" not found for the given .NET object.
What am I doing wrong?
I've made a script to download some files from a remote site which uses a private key and a passphrase.
The Winscp part of the script is
{
# Load WinSCP .NET assembly
Add-Type -Path "E:\location\WinSCPnet.dll"
# Setup session options
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
Protocol = [WinSCP.Protocol]::Sftp
HostName = "data.xxxxxxxxxx.com"
UserName = "my username"
PrivateKeyPassphrase = "*P,7$+Y#}^k@^"
SshPrivateKeyPath = "E:\location\bdl.ppk"
SshHostKeyFingerprint = "ssh-rsa 1024 the fingerprint"
}
And when I run the script I'm getting
Member "PrivateKeyPassphrase" not found for the given .NET object.
What am I doing wrong?