All, I'm working with a solution which makes use of the WinINet API (FTP functions) to FTP files from a Windows 2K client to a AIX server. While this works fine, my current client wants me to use Secure FTP. They are running OpenSSH 3.71p, and the requirements are to not change the server side daemon, and only change my client calls. While I'm fine with this, my current implementation takes advantage of WinINets ability to completely manage the file transfer session. I'm simply making calls to InternetOpen(), FtpPutFile() and InternetCloseHandle(). Is there a possibility that I can make API level calls with OpenSSH and replace my WinINet calls? If so, I have not been able to locate API's to do so, and would appreciate some pointers to documentation. If there is an API available, or an API based solution, I'm interested in FREE or purchasing a commercial version. I just want to meet the requirements of my customer. Thank you, Larry Welch
Welch, Larry wrote:> All, > > I'm working with a solution which makes use of the WinINet API (FTP > functions) to FTP files from a Windows 2K client to a AIX server. While > this works fine, my current client wants me to use Secure FTP. They are > running OpenSSH 3.71p, and the requirements are to not change the server > side daemon, and only change my client calls.OpenSSH doesn't presently offer a library-style API. We would like to do one, but is is not likely to happen soon (if ever) because it is a lot of work. On the other hand, you can run ssh at the end of a pipe and use it as a transport by making reads and writes to/from the pipe. This is what scp, sftp, cvs, rsync and a heap of other programs do. Alternately, the sftp program supports batchfiles to automate transfers. If you set up public key authentication, then you can use these to do your work - your program could just write a batch file, run sftp and check that it was successful. -d
Thank you Damien. Do you know of any commercial products which could provide me the APIs which talk to the OpenSSH back end? My last resort would be to manage the file transfer through my program, and I'm a bit concerned about calling out because there will be hundreds of calls in a single iteration of my program. Cheers, Larry -----Original Message----- From: Damien Miller [mailto:djm at mindrot.org] Sent: Tuesday, August 30, 2005 8:00 AM To: Welch, Larry Cc: openssh-unix-dev at mindrot.org Subject: Re: Replacing WinInet functions with OpenSSH API Calls Welch, Larry wrote:> All, > > I'm working with a solution which makes use of the WinINet API (FTP > functions) to FTP files from a Windows 2K client to a AIX server.While> this works fine, my current client wants me to use Secure FTP. Theyare> running OpenSSH 3.71p, and the requirements are to not change theserver> side daemon, and only change my client calls.OpenSSH doesn't presently offer a library-style API. We would like to do one, but is is not likely to happen soon (if ever) because it is a lot of work. On the other hand, you can run ssh at the end of a pipe and use it as a transport by making reads and writes to/from the pipe. This is what scp, sftp, cvs, rsync and a heap of other programs do. Alternately, the sftp program supports batchfiles to automate transfers. If you set up public key authentication, then you can use these to do your work - your program could just write a batch file, run sftp and check that it was successful. -d