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: Open Call in Powershell not working

And can you connect with any other SFTP client? (i.e. does your SFTP server work at all?)
lloftus

Open Call in Powershell not working

No, I am not able to connect using the WinSCP GUI. I get the same issue it seems.
martin

Re: Session.Open Timeout Issue

Can you connect with WinSCP GUI or with any other SFTP client? (running on the same local machine).
If you can, please post its log file too.
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()
}