I need to receive and parse data sent over SSH via SFTP in my .NET 4.5 application. The SFTP server is running Cygwin OpenSSH on a Windows 2008 server.
I know the .NET TcpListener
class can receive and parse data sent via FTP, but I don't know if this is possible with SFTP, and if TcpListener
can receive the data, is it necessary or possible to decrypt the data?
Unfortunately, it is a requirement that I receive the data over SSH via SFTP, so requesting to receive the data via FTP or FTPS is not an option.
OpenSSH does not offer any triggers you could use to process received files.
All you can do is to monitor local file system, where OpenSSH stores the uploaded (received) files.
Or poll the files over SFTP as @user469104 suggested.
Or use a different SFTP server that supports triggers. Though I do not know any free server that supports this.
Ntb, to use
TcpListener
, you would have to implement SSH/SFTP protocols on your own. What is an immense task.