Jump to content


Photo

FTP with SSL, Clear Command Channel


  • Please log in to reply
20 replies to this topic

#1 kevingauvin

kevingauvin
  • Members
  • 16 posts

Posted 04 February 2009 - 04:56 PM

HI,

I've got a site that I want to FTP to using the FTP Library. The Admin on the remote server say that I need to do a "Clear command channel" in order to get through his firewall. I don't have a clue as to what he's talking about. Is this even possible to do with smartftp?

Thanks,
kevin

#2 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 04 February 2009 - 10:43 PM

Yes of course.

FTPLib:
Set the CommandProtection property (of the FTPConnection) to ftpDataProtectionClear = 1

SmartFTP:
Just go to the Favorite properties. Then go to the Connection->SSL dialog and set the control connection to Clear.

Regards,
Mat

#3 kevingauvin

kevingauvin
  • Members
  • 16 posts

Posted 05 February 2009 - 02:58 PM

Thanks,

I guess I still don't fully understand how to write the "ftpDataProtectionClear = 1". Do you have some sample code that I could look at. Here's what I've got so far but I know "objFTP.ftpDataProtectionClear = 1" is not right.


Dim objFTP
Set objFTP = CreateObject("sfFTPLib.FTPConnectionSTA")


objFTP.Host = "xxx.xxx.xxx.xxx"
objFTP.Username = "abcd1243"
objFTP.Password = "zxcv9876"
objFTP.ftpDataProtectionClear = 1
objFTP.Port = 21
path= "/to_xpn"


objFTP.Connect()

#4 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 05 February 2009 - 04:12 PM

You forgot to set the Protocol property to SSLExplicit.

Regards,
Mat

#5 kevingauvin

kevingauvin
  • Members
  • 16 posts

Posted 05 February 2009 - 05:18 PM

Thanks for all of the help Mat.

I added what you suggested and I am getting an error saying "Object doesn't support this property or method: 'ftpDataProtectionClear' ", It's failing on this line of the script "objFTP.ftpDataProtectionClear = 1" .

Any ideas?

#6 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 05 February 2009 - 06:11 PM

CommandProtection is the name of the property. ftpDataProtectionClear is the name of the constant. So the correct line is:
objFTP.CommandProtection = 1

#7 kevingauvin

kevingauvin
  • Members
  • 16 posts

Posted 06 February 2009 - 01:01 PM

Same kind of error. I should mention that I'm using the FTPLib and writing the code as VB script.

I am getting an error saying "Object doesn't support this property or method: 'CommandProtection' , It's failing on this line of the script "objFTP.CommandProtection = 1" .

Thanks for taking the time to help me with this problem

#8 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 06 February 2009 - 09:30 PM

Works here as expected. Make sure that you have the latest version of the FTP Library installed:
http://www.smartftp..../SFTPFTPLib.exe

Regards,
Mat

#9 kevingauvin

kevingauvin
  • Members
  • 16 posts

Posted 09 February 2009 - 06:19 PM

Thanks,

Yes, the most current version does work on my pc. I was able to get my script to run. now I'll just have to sort out why I'm getting a return code of 17 after I execute the connect.

I currently have a license for FTPLib and I am running version 1.5.9.16 on our production server. Do you know if the new version of the dll will allow me to use the same license or do I require an upgrade.

Thanks,
Kevin

#10 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 09 February 2009 - 06:27 PM

Dear Kevin ..

Please contact us at sales@smartftp.com and provide your license key id.

Regards,
Mat

#11 kevingauvin

kevingauvin
  • Members
  • 16 posts

Posted 13 February 2009 - 01:33 PM

Hi,

I'm setting the following but I am still having problems connecting to the server. The server admin is saying that he's not receiving the the Clear Command Channel.

obj.Host = "xxx.xxx.xxx.xxx"
obj.Username = "abcd1243"
obj.Password = "zxcv9876"
obj.Port = 21
obj.Protocol = 2 ' ftpProtocolNormal
obj.CommandProtection = 1
obj.Passive = 1

' Connect
result = obj.Connect()
WScript.Echo "Connected " & result & vbCrLf


the connect log is showing

[20090212 19:13:19] SmartFTP FTP Library v1.5.17.15
[20090212 19:13:21] Resolving host name "xxx.xxx.xx.xx"
[20090212 19:13:21] Connecting to xxx.xx.xxx.xxx Port: 21
[20090212 19:13:21] Connected to xxx.xxx.xxx.xxx.
[20090212 19:13:21] 220-This System Is For Authorized Users Only.
[20090212 19:13:21] 220-
[20090212 19:13:21] 220 Secure FTP Server - SecureTransport 4.7 ready.
[20090212 19:13:21] AUTH TLS
[20090212 19:13:21] 234 SSLv23/TLSv1
[20090212 19:13:21] Connected. Exchanging encryption keys...
[20090212 19:13:21] An established connection was aborted by the software in your host machine.
[20090212 19:13:21] Server closed connection

#12 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 13 February 2009 - 01:37 PM

Try SmartFTP and then post the log. What operating system are you using?

Regards,
Mat

#13 kevingauvin

kevingauvin
  • Members
  • 16 posts

Posted 13 February 2009 - 01:59 PM

I'm using Windows XP, Here's what shows up lin the log window

[09:55:52] SmartFTP v3.0.1024.32
[09:55:52] Resolving host name "xxx.xxx.xx.xx"
[09:55:52] Connecting to xxx.xxx.xx.xx Port: 21
[09:55:52] Connected to xxx.xxx.xx.xx.
[09:55:53] 220-This System Is For Authorized Users Only.
[09:55:53] 220-
[09:55:53] 220 Secure FTP Server - SecureTransport 4.7 ready.
[09:55:53] AUTH TLS
[09:55:53] 234 SSLv23/TLSv1
[09:55:53] Connected. Exchanging encryption keys...
[09:55:53] An established connection was aborted by the software in your host machine.
[09:55:53] Server closed connection
[09:55:53] Connect failed. Waiting to retry (30s)...

#14 kevingauvin

kevingauvin
  • Members
  • 16 posts

Posted 13 February 2009 - 02:36 PM

Hi,

I also tried to connect to "SmartFTP - FTPS" using the SMARTFTP Client and got the same results in the log file.

#15 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 13 February 2009 - 03:13 PM

Are you using Windows Vista?

#16 kevingauvin

kevingauvin
  • Members
  • 16 posts

Posted 13 February 2009 - 03:31 PM

I am using Windows XP

#17 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 13 February 2009 - 03:47 PM

Please try the latest version:
http://www.smartftp....et/SFTPBeta.exe

#18 kevingauvin

kevingauvin
  • Members
  • 16 posts

Posted 13 February 2009 - 05:55 PM

I downloaded the new EXE and tried it. I got the following results the first time.


[13:10:47] SmartFTP v3.0.1026.2
[13:10:47] Resolving host name "205.174.34.41"
[13:10:47] Connecting to 205.174.34.41 Port: 21 [13:10:47] Connected to 205.174.34.41.
[13:10:47] 220-This System Is For Authorized Users Only.
[13:10:47] 220-
[13:10:47] 220 Secure FTP Server - SecureTransport 4.7 ready.
[13:10:47] AUTH TLS
[13:10:47] 234 SSLv23/TLSv1
[13:10:47] Connected. Exchanging encryption keys...
[13:11:48] Timeout (60s).
[13:11:48] Client closed the connection.
[13:11:48] Connect failed. Waiting to retry (30s)...


Now everytime I try it I get

[13:54:41] SmartFTP v3.0.1026.2
[13:54:41] Resolving host name "205.174.34.41"
[13:54:41] Connecting to 205.174.34.41 Port: 21
[13:54:41] Connected to 205.174.34.41.
[13:54:42] 220-This System Is For Authorized Users Only.
[13:54:42] 220-
[13:54:42] 220 Secure FTP Server - SecureTransport 4.7 ready.
[13:54:42] AUTH TLS
[13:54:42] 234 SSLv23/TLSv1
[13:54:42] Connected. Exchanging encryption keys...
[13:54:42] An established connection was aborted by the software in your host machine.
[13:54:42] Connect failed. Waiting to retry (30s)...
[13:54:42] Server closed connection

#19 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 13 February 2009 - 07:00 PM

It looks like a SSL problem on the server side. Maybe you can get the log from the server and see why it disconnect the client (SmartFTP).

Regards,
Mat

#20 kevingauvin

kevingauvin
  • Members
  • 16 posts

Posted 17 February 2009 - 05:31 PM

Hi,

I talked to the guy who looks after the remote server. He's convinced that the CCC is not being sent. He even downloaded the SMARTFTP client and tried to get it to connect.

I'm not sure where to go from here. Any ideas?

thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users