I need to do FTP with SSL (FTPS). I can connect to the server (3rd party) using SecureFX if I check the Disable certificate validation, so that tells me their certificate isn't being validated correctly, but I can't do anything about that...the security is for their benifit so if they don't do it right, I don't care. What I do care about is being able to download the files using FTPS which I can't seem to get to work with Rebex as I can't figure out how to disable certificate validation. Is there a way?

    Dim f As New Rebex.Net.Sftp()
    f.Connect(Host)
    f.Login(UserID, PW)
    f.GetFiles("/ftprca/Outbound/epic", "c:\aatemp\", Rebex.Net.SftpBatchTransferOptions.Default, Rebex.Net.SftpActionOnExistingFiles.OverwriteAll)
    f.Disconnect()

asked 08 Mar '10, 19:32

Franklin's gravatar image

Franklin
261
accept rate: 0%

edited 10 Aug '10, 13:34

Rebex%20KB's gravatar image

Rebex KB ♦♦
256312


You seem to be using "Rebex SFTP" (file transfer over SSH) instead of "Rebex FTP/SSL" (FTPS, FTP over SSL) - please check out our Secure FTP disambiguation page for more information about these protocols and component.

I think you should use Rebex FTP/SSL instead. To skip certificate validation in Rebex FTP/SSL, you can use the following code:

' disable certificate validation - accept any certificate
Dim p As New Rebex.Net.TlsParameters()
p.CertificateVerifier = CertificateVerifier.AcceptAll

Dim f As New Rebex.Net.Ftp()
' not sure whether you need explicit or implicit TLS/SSL
f.Connect(Host, 21, p, FtpSecurity.Explicit)
' f.Connect(Host, 990, p, FtpSecurity.Implicit)
f.Login(UserID, PW)
f.GetFiles("/ftprca/Outbound/epic", "c:\aatemp\", Rebex.Net.SftpBatchTransferOptions.Default, Rebex.Net.SftpActionOnExistingFiles.OverwriteAll)
f.Disconnect()

But please be aware that skipping certificate validation in production environment is greatly discouraged - please check out certificate validation HOWTO for an overview of recommended solutions.

link

answered 09 Mar '10, 10:50

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.2k18
accept rate: 32%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×115
×18
×7

Asked: 08 Mar '10, 19:32

Seen: 749 times

Last updated: 23 Mar '11, 13:22