IonicWind Software

Aurora Compiler => Coding Help - Aurora 101 => Topic started by: Rock Ridge Farm (Larry) on December 28, 2006, 08:26:12 PM

Title: How do I call sftp?
Post by: Rock Ridge Farm (Larry) on December 28, 2006, 08:26:12 PM
The following will call ftp and get a file:
    error = FtpGetFileA(hconnect, <file to get>, <local file name>, 0, 0, 0x2, 0);
What call would I use for sftp (secure ftp/ssh)?
I am sure the open call would change as well.
Title: Re: How do I call sftp?
Post by: Rock Ridge Farm (Larry) on January 02, 2007, 07:39:52 AM
Does the resounding silence indicate that I am the only one interested in this?
Title: Re: How do I call sftp?
Post by: Bruce Peaslee on January 02, 2007, 09:44:26 AM
No, but I don't have the answer.   :-\
Title: Re: How do I call sftp?
Post by: J B Wood (Zumwalt) on January 02, 2007, 10:26:43 AM
Don't know if this helps:
http://doc.ddart.net/msdn/header/include/wininet.h.html (http://doc.ddart.net/msdn/header/include/wininet.h.html)

This one might be more appropriate:
http://www.tek-tips.com/faqs.cfm?fid=5904 (http://www.tek-tips.com/faqs.cfm?fid=5904)

I don't have the time to translate them at the moment to Aurora or EBasic.
Title: Re: How do I call sftp?
Post by: Rock Ridge Farm (Larry) on January 02, 2007, 11:52:11 AM
Both of those appear to be for regular ftp.
I have that working - it is sftp I can not find info about.
I implemented the ftp with little effort but can not find a comprable approach for sftp.
All I want to do is login and retreive one file do not need fancy screen interface just the code to login
and get one file.
I have 700 systems mixed windoz, unix, aix, sun, and linux. Many use only sftp for access.
Title: Re: How do I call sftp?
Post by: Shannara on January 02, 2007, 02:05:07 PM
The secure edition of socket tools allow this I believe. There are also classes for Aurora for use with Socket Tools. It costs a pretty penny though.
Title: Re: How do I call sftp?
Post by: Mike Stefanik on January 02, 2007, 03:56:28 PM
The current version of SocketTools supports FTPS (FTP+SSL) but doesn't yet support SFTP (FTP+SSH); that's coming out in a few months with the next major release. As far as the Aurora classes are concerned, I haven't made any decisions about them since the compiler is still in beta. It's a side project of mine that I started last year, and really isn't part of the commercial SocketTools products per se. You're right that the SocketTools Library Edition would be out of the price range for most hobbiests, it's really designed for commercial software development. As Aurora moves along, we'll see what happens.
Title: Re: How do I call sftp?
Post by: Rock Ridge Farm (Larry) on January 05, 2007, 08:09:52 AM
I am sinking here - have a major project that I could deploy using Aurora but I need to be able to build in
sftp. Got the ftp part to work but needs sftp.
Help!
I could possibly use the C++ lib if I knew how.
Title: Re: How do I call sftp?
Post by: Ionic Wind Support Team on January 05, 2007, 10:55:17 AM
Unfortunately I have no idea myself.  Have you tried the normal channels like searching Google for SFTP + source, etc ?
Title: Re: How do I call sftp?
Post by: Zen on January 06, 2007, 05:56:57 AM
Larry. I am looking into it now but there is no way I can have it done anytime soon.

Lewis
Title: Re: How do I call sftp?
Post by: Vikki on January 07, 2007, 11:10:40 AM
I don't know if any of this info will help you are not but it seems you may want to use InternetConnectA to pass the secure information (user/pass). Below are two links that may or may not be useful.

This first one is the declaration:

http://source.winehq.org/WineAPI/InternetConnectA.html

This next one is an example in PB (titled unattended ftp but talks about a secure ftp connection in the second post:

http://www.powerbasic.com/support/forums/Forum7/HTML/000593.html

From MS:

http://msdn2.microsoft.com/en-us/library/aa384363.aspx

Supposedly the ftp we're talking about is used over an ssh connection but I read that so many pages ago I'm not sure anymore.

Anywho, I'll keep looking...


Title: Re: How do I call sftp?
Post by: Zen on January 08, 2007, 03:39:42 AM
Larry.

I would recomend reading through the source code for Putty. It has FTP over SSH in there somewhere, unfortunatley I don't have time to look, but maybe it can help.

Lewis
Title: Re: How do I call sftp?
Post by: Rock Ridge Farm (Larry) on January 09, 2007, 07:48:00 AM
Putty is a bit large - I did find a sftp lib written in ms6 C++ - I think I will invest the time to convert it to Aurora.
Anyone else interested in this?
Title: Re: How do I call sftp?
Post by: Zen on January 09, 2007, 07:50:02 AM
Yes larry I am interested in it. It would be good research for me as I do want to add SFTP and FTPS functionality to the CCL ftp class. HTTPS was easy as it is supported through the windows API, but for some reason FTPS and SFTP is not.

Lewis
Title: Re: How do I call sftp?
Post by: Rock Ridge Farm (Larry) on January 09, 2007, 07:51:31 AM
Sure - leave the work to the old guy :)
Will keep you posted on my progress - it is a big lib.
Title: Re: How do I call sftp?
Post by: Zen on January 09, 2007, 09:16:58 AM
lol. Well if you send me it or tell me where you got it from, I can take a look too.

Lewis
Title: Re: How do I call sftp?
Post by: Rock Ridge Farm (Larry) on January 09, 2007, 09:37:11 AM
This is the lib I am looking at.
Title: Re: How do I call sftp?
Post by: Zen on January 09, 2007, 09:58:54 AM
Ok thanks Larry.

I will take a look and see what I can do as soon as possible

Lewis
Title: Re: How do I call sftp?
Post by: Rock Ridge Farm (Larry) on August 24, 2007, 07:16:09 AM
Well - I got sidetracked and never finished. Lewis - did you ever get to look at it.
Once more I find I am in need to be able to sftp to a site to retrieve files.
Help???