Does version 5.7.7.0 support FTP explicit TLS?

Advertisement

Steve34
Joined:
Posts:
2
Location:
UK

Does version 5.7.7.0 support FTP explicit TLS?

Apologies if this is documented somewhere. In version 5.7.7.0 is the following supported:
winscp.com /command "open ftpes://ftp.myserver.co.uk|myusr:mypasswd@ftp.myserver.co.uk"

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,392
Location:
Prague, Czechia

Re: Does version 5.7.7.0 support FTP explicit TLS?

You should not use 5.7.7. It's over 5 years old.

Anyway, 5.7.7 supports the FTP with an explicit TLS encryption. But it does not support the ftpes prefix. Instead, use ftp and add -explicit switch. See help open.

Reply with quote

Steve34
Joined:
Posts:
2
Location:
UK

Re: Does version 5.7.7.0 support FTP explicit TLS?

Thanks Martin, it worked
My SSIS package was developed with the latest version of WinSCP. But the server has 5.7.7. Do you think my SSIS c# code will work on the server?
SessionOptions sessionOptions = new SessionOptions
{
    Protocol = Protocol.Ftp,
    HostName = (string)Dts.Variables["User::HostName"].Value,
    UserName = (string)Dts.Variables["User::UserName"].Value,
    Password = (string)Dts.Variables["User::Password"].Value,
    FtpSecure = FtpSecure.Explicit,
};
 
sessionOptions.AddRawSettings("AddressFamily", "1");
sessionOptions.AddRawSettings("MinTlsVersion", "12");
 
using (Session session = new Session())
{
 
    session.ExecutablePath = (string)Dts.Variables["User::WinSCPexePath"].Value;
 
    // Connect
    session.Open(sessionOptions);
 
    // Upload files
    TransferOptions transferOptions = new TransferOptions();
    transferOptions.TransferMode = TransferMode.Binary;
 
    TransferOperationResult transferResult = session.PutFiles(
        (string)Dts.Variables["User::LocalFilePath"].Value + (string)Dts.Variables["User::LocalFileName"].Value,
         (string)Dts.Variables["User::RemoteDir"].Value,
         true, transferOptions);
 
    // Throw on any error
    transferResult.Check();

Reply with quote

martin
Site Admin
martin avatar

Re: Does version 5.7.7.0 support FTP explicit TLS?

I'm not sure you can run compiled C# code against different version of the assembly. But I'm not SSIS expert. Shouldn't the WinSCP .NET assembly be part of your SSIS package? What does it even mean "the server has 5.7.7"? Are you referring to WinSCP or WinSCP .NET assembly? Aren't you relying on the installed version of WinSCP.exe? You should not. Deploy your own version with your SSIS package.
See https://winscp.net/eng/docs/library_ssis#using

Reply with quote

Advertisement

You can post new topics in this forum