c# - Connect to FTP site using SFTP and download files -
i need download files ftp site. need connect sftp connect. unable find examples/tutorials download files ftp site using sftp connect.
can please point me tutorial or provide sample code begin ?
tamir's sharpssh library handles sftp pretty well. , there plenty of examples, gist is:
sftp sftp = new sftp(sftphost, sftpuser); console.writeline("success"); // assuming public/private key authentication here... sftp.addidentityfile(privatekeyfilename, privatekeyfilepassphrase); sftp.connect(sftpport); arraylist files = sftp.getfilelist("."); foreach (string file in files) { console.writeline("\t{0}", file); } sftp.close();
Comments
Post a Comment