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

lloftus

Session.Open Timeout Issue

The following code snippet will timeout while trying to open the session with our vendor. We have confirmed via Wireshark that their server will see the initial request but nothing after that.

There is more code after the Session.open but I have not included it in the snippet as it never gets to run due.

# Load WinSCP .NET assembly
Add-Type -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll"

# Set up session options
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
Protocol = [WinSCP.Protocol]::Sftp
HostName = "sftp21-cmh.sumtotalsystems.com"
UserName = "cust_mmm_Dozuki"
Password = "YVCbf-X0"
SshHostKeyFingerprint = "ssh-rsa 2048 k8L86hrEaiZl+v/f+Wu1Lo/lgNuqkcWZqSi/iF1iKzl"
}

$session = New-Object WinSCP.Session
$session.SessionLogPath = "C:\Dozuki_Files\Scripts\_automatedScripts\winscp.log.txt"
try
{
# Connect


$session.Open($sessionOptions)
}

finally
{
$session.Dispose()
}