Post a reply

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

Kell

Connect to SFTP taht uses Passphrase with powershell script

Hello

I'm triying to use the following code to connect to SFTP with a Passphrase. It 's for a powershell script.

New-Object WinSCP.SessionOptions -Property @{
Protocol = [WinSCP.Protocol]::Sftp
HostName = $HostName
UserName = $User
PortNumber = $Port
SshHostKeyFingerprint = $HostKey
SshPrivateKeyPath = $Password
SecurePrivateKeyPassphrase= $Passphrase
}

However I'm getting the following message:

Exception calling "Open" with "1" argument(s): "Network error:
Connection to "st1.primetherapeutics.com" timed out."
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Test Connection - Test.ps1