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.
Does the resounding silence indicate that I am the only one interested in this?
No, but I don't have the answer. :-\
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.
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.
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.
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.
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.
Unfortunately I have no idea myself. Have you tried the normal channels like searching Google for SFTP + source, etc ?
Larry. I am looking into it now but there is no way I can have it done anytime soon.
Lewis
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...
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
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?
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
Sure - leave the work to the old guy :)
Will keep you posted on my progress - it is a big lib.
lol. Well if you send me it or tell me where you got it from, I can take a look too.
Lewis
This is the lib I am looking at.
Ok thanks Larry.
I will take a look and see what I can do as soon as possible
Lewis
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???