EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Two feature suggestions to SimpleSFTPClient

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
Posted: 08/18/2006 10:15:07
by Antti Karttunen (Basic support level)
Joined: 05/30/2006
Posts: 5


I need to maintain a SSH terminal connection and a SFTP connection to a remote server simultaneously. In my current code I connect to server with TElSSHClient and create subsystem tunnels for both terminal and SFTP connection (SFTP is handled with TElSFTPClient).

I noticed that recently TElSimpleSFTPClient has been enhanced with some great features like Upload/DownloadStream, Upload/DownloadFiles. It would also be much simpler to use SimpleSFTPClient than SFTPClient. However, SimpleSFTPClient has its own internal SSHClient and thus it creates an unnecessary secondary connection to the remote server. I have to simultaneously maintain dozens of servers with similar connections, so it would waste lot of resources. Maybe the robust and flexible architechture of the SecureBlackBox components could be used to circumvent this?

My suggestion: It would be really good if SimpleSFTPClient.Create had an optional TElSSHClient parameter where you could put your own SSHClient. Then SimpleSFTPClient would assign SSHClient to FClient and so on. When SSHClient connects to server, it would create the subsystem tunnel and SimpleSFTPClient.FSFTPClient could initialize it (calling SimpleSFTPClient.Open would be unnecessary).

I have also been planning to start using SimpleSSHClient instead of SSHClient so it would be even better if one could use attach SimpleSFTPClient to a SimpleSSHClient in the above-mentioned way (publish SimpleSSHClient.TunnelList?)


My second, perhaps simpler suggestion:

Could ElSimpleSFTPClient.OnFileOperation event have an optional parameter like
var LocalStream: TStream

where user could specify the local stream to be used for upload/download. I would like to use the UploadFiles/DownloadFiles methods, but I need to do CRLF <-> LF conversion and the server does not support ASCIIMode. This way I could read/write the data from/to a self-implemented buffered filestream that also handles the CRLF-conversion.

Best regards,
Antti Karttunen
Posted: 08/18/2006 11:33:07
by Eugene Mayevski (EldoS Corp.)

Thank you for the ideas. While they do make sense, implementing them makes the simple components not-so-simple. All functionality of TElSimpleSFTPClient that you need can be added to TElSftpClient in 5-10 hours (and this must be done only once).
The idea of specifying the external SSH client is plain contraversial to the idea of TElSimpleSFTPClient. As for the streams -- the event can not be changed (cause the existing code will be broken), and you can implement your version of UploadFiles/DownloadFiles in an hour or less (especially as you have the source code of TElSimpleSFTPClient and can just copy/paste the code from there).

Sincerely yours
Eugene Mayevski



Topic viewed 3465 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!