SFTP needs

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

SFTP needs

Post by Bob Hansen » Wed Aug 31, 2005 3:29 pm

I have just been notified that an FTP site that I use is switching to SFTP.
I connect with Macro Scheduler on a regular basis to upload/download, etc.

I am concerned that these scripts will not work. Tell me that I am wrong.
If I am right, can anything be done to make the current FTP commands work with SFTP, or can new SFTP commands be made that use the same syntax to allow an easy conversion? If can be added/modified, can also do to Beta version?

I did a search on the forum and see no messages with SFTP.

I have not worked with SFTP before so I am yet to learn what the differences are. Will certainly know more over the next few days.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed Aug 31, 2005 3:47 pm

I don't think macroscheduler supports sftp directly, so you may want to look into moveit freely http://www.standardnetworks.com/product ... y_number=1 This is a free, command line ftp replacement for windows command line ftp, scriptable using the regular commands and supports SSL/SSH transfers (and wildcard multiple file transfers).

Originally recommended by someone on this group I've found it to be very easy to use and reliable.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Aug 31, 2005 3:52 pm

One thing I have picked up already:

Apparently, SFTP uses port 22 vs port 21.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Aug 31, 2005 4:23 pm

Thanks Me_again

I will look into that as a contingency plan for this. My hope is that Macro Scheduler will be modified if needed. That would be my first choice.

I can manually use Filezilla if I really get pushed, but do want it automated. So using a command line utility is certainly an option.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Aug 31, 2005 4:43 pm

I mentioned using Filezilla manually in an earlier posting.
But I just found these basic command line options also:
FileZilla does support some basic command line options. The supported options are:
URL
You can specify a URL FileZilla connect to when started

-d
Downloads the specified file from the server into the target dir

-u
Uploads the specified file into the target dir on the server. has to be the full path of the file.

-t
Only valid together with -u or -d: Specifies an alternate name for the target file.

Example:
filezilla.exe -u "c:\Program File\FileZilla\FileZilla.exe" ftp://user:[email protected]/upload -t CoolProg.exe
I can set up the URL in Filezilla as using an SFTP server, so I would be able to at least up/download files with these command lines. Another possible contingency in addition to MoveIt which I have downloaded, but not tried out yet.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed Aug 31, 2005 8:39 pm

Hey, thanks for that tip. I use Filezilla for all my manual FTP but I didn't know it supported any command line :D

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Aug 31, 2005 8:52 pm

One hand washes the other. :D
I guess that was my way of thanking you for MoveIt option.

Don't know if it supports wildcards. Have not tried it yet, just planning for response if Macro Scheduler will not handle it.

New SFTP server will be online tomorrow, so I can test with port 22 vs. port 21 used for current FTP.

Who knows, maybe underlying code already supports the encryption things.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Sep 01, 2005 9:15 am

Will look into feasibility of adding SFTP support to the existing FTP commands in Macro Scheduler but, either way, it won't make 7.4 release, so in mean time I'd go with one of your proposed solutions.

Another solution would be to use an ActiveX control in VBScript. Doubt there are any free ones available but there are these:

http://www.secureblackbox.com/
http://www.weonlydo.com/
MJT Net Support
[email protected]

User avatar
tony_smith
Pro Scripter
Posts: 70
Joined: Wed May 14, 2003 8:25 pm
Location: Vancouver BC Canada

Post by tony_smith » Fri Sep 09, 2005 8:18 pm

There is a solution included with WS_FTP-PRO for SFTP/SSH. I have not had the opportunity to use it yet as our trading partners have only made rumblings. I looked at the help file and it seems to answer most of the questions posed here. WS_FTP can run from a command-line with switches, so it can be called from within a script.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Nov 17, 2005 4:29 am

I got a question tonight from tony_smith about how I made out with the SFTP issue and Macro Scheduler commands. So I thought I should provide the forum with my solution.

Actually I made out great.

Something apparently went wrong at their end. :shock:

After they made the change to SFTP, I found that my original code was still working! :roll: I was able to continue with no changes until about two weeks ago when the use of FTP was eliminated completely by them.

The actual history is of no importance, but the bad news is that I have no solution to offer anyone else if they have the same need. Bottom line was that I was not forced into a sensible solution this time around.

Sorry about that......
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Nov 17, 2005 11:27 am

Bob,

We have looked into adding SFTP support but have some concerns about adding it to Macro Scheduler. First you need to realise that adding the S to FTP is not a case of flicking a switch. SFTP is an entirely different protocol to FTP. It is not just encryption over FTP. FTP with SSL is one thing - simply the old FTP protocol with the data encrypted with SSL. But SFTP is a different protocol altogether which works over an SSH channel and has nothing in common with FTP whatsover.

SFTP uses several different authentication methods, one of which is the use of a private key. It also offers several different encryption methods including 3DES, Blowfish, Twofish (128, 192 and 256), AES (128, 192, 256), Serpent (128, 192, 256 bit), Arcfour, Idea, Cast 128 and DES. Next we have to consider whether the server expects/supports the ZLIB compression algorithm. If a public key is employed we need to know the algorithm used during the handshake: X509 RSS or DSS, SPKI RSA or DSS, PGP RSA or DSS. And what about the key exchange algorithm used during handshake? What MAC algorithm is used during the SSH session? SHA1, or MD5 and should it be 96 bit? Need I go on?

Now all of this is technically achievable of course, but just imagine how much bloat all that will add to Macro Scheduler! Our conservative estimates are around 200k. Compiled executables will be around 200k larger to support SFTP implementations (even if your script doesn't use SFTP). And it will be no good modifying the existing FTP commands, we will need to duplicate all of them and add more parameters. Imagine the size of an SFTPPutFile command!

Realistically SFTP is not an ideal candidate for an internal native Macro Scheduler command set. It would make much more sense to make it an external library. We could create an SFTP DLL for use with Macro Scheduler, but third party libraries already exist. Me_Again posted a link to Moveit which is apparantly free. If that can be scripted easily with Macro Scheduler then that sounds like an obvious, inexpensive solution. Furthermore I feel that SFTP is something that is best left to the security experts. I honestly feel it would work better as a third party library or external command line tool scriptable with Macro Scheduler.

One other solution for anyone that must have native SFTP commands in Macro Scheduler would be a custom build. We are always happy to discuss custom versions of Macro Scheduler.

What might be more helpful would be some examples showing how to use Moveit and/or other third party tools with Macro Scheduler with links to download locations.

Hope this explains the situation. Let me know if you have any thoughts.
Marcus

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Thu Nov 17, 2005 11:28 pm

Yes I Have Noticed That The Exes Are Nearly 400kb Just By Themselfs, Adding An Extra 200kb Wouldnt Be The Best Way, However I Do Wish You Luke With Your Problem Bob.
FIREFIGHTER

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Nov 17, 2005 11:48 pm

Obiously I was not clear. :oops:

I HAVE NO SFTP PROBLEM ! :D

I erred in not getting back to the forum before this. Thanks to tony_smith for kicking me.

My years-old macros continued to work, with no changes, on the "new SFTP" site. Don't know why, and don't care.

I was providing an interface to one of my clients vendors. The vendor ultimately pulled the plug on their SFTP interface (which was still working for us), and provided a web based interface instead.

Yes, Macro Scheduler was used to automate the new web based application also.

My request for SFTP support is not as important to me anymore. I do appreciate your explanation of why it may not be available in the near future. It is great when a development group listens to the end users.

So, thanks to all, and again. I HAVE NO SFTP PROBLEM ! :D
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

SFTP

Post by CyberCitizen » Sun May 14, 2006 1:46 pm

SFTP Is Now Becoming An Issue For Me As Well & Would Like To Know The Process Of SFTP & If It Will Be Implemented To MS.

We Are Using EXE's Which Allow Gamers To Upload Certin Files, They Are Limited To What FTP Access Level They Have, However Would Like To Start Looking At Providing A SFTP Option In The File.

Is This Something That I Can Expect Soon, Much Like The Other Request Of Having Tick Boxes When Compiling EXE's Instead Of Having To Type The Command Lines.
FIREFIGHTER

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon May 15, 2006 7:46 am

Do you mean SFTP or FTP over SSL? If SFTP which authentication method do you wish to use, which encryption method should be offered and which compression algorithm to use?

As previously explained I am very concerned about adding such major functionality and bulk into the core of Macro Scheduler. I believe very strongly that this would be much better as an add on DLL or ActiveX. Such libraries are in fact already available from third parties such as:

http://www.weonlydo.com/index.asp?showform=SFTPdll

http://www.weonlydo.com/index.asp?showform=SFTP

http://www.eldos.com/sbb/activex-sftp.php

By using a DLL you can ship SFTP functionality with EXEs that require it, using proven components.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts