.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SSH/SFTP Communications in C#

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :.NET Framework
I'm looking to get started implementing a SFTP handler in my application (.net 2.0) and so far I'm just not finding what I'm looking for. Seems like all the SSH/SFTP code and libraries out there are for the Linux crowd.

Can anyone point me in the right direction? Am I going to be making calls to a command-line SSH app, or is this something that's going to be doable with reasonable effort?

View Complete Post

More Related Resource Links

Foundations: Workflow Communications


Matt Milner introduces the Windows Workflow Foundation (WF) communication architecture and covers sending data out of a workflow and submitting data to running workflow instances.

Matt Milner

MSDN Magazine September 2007

Serial Comm: Use P/Invoke to Develop a .NET Base Class Library for Serial Device Communications


Out-of-the-box, the only way of coding RS232 serial communications applications in the .NET environment is to import the outdated and somewhat limited MSComm ActiveX control. This article describes the development of a lean, multithreaded, and modern RS232 base class library in C# managed code. The library uses Platform Invocation Services to interact with the Win32 API directly. Application programmers can use the library from any .NET language through inheritance; the article explores examples written in C# and Visual Basic .NET.

John Hind

MSDN Magazine October 2002

Service to monitor SFTP location


Hi there,

I want to develop a service (may be Web / WCF / Windows) to monitor a SFTP location for excel files. As soon as any excel file arrives, service should be able to move it to some location and initiate another process.

My queries are:

1. Can we monitor SFTP using services? If not, what are the other ways to monitor.

2. Which service (Web / WCF / Windows) should I use? What could be the challenges?

Any help is highly appreciated. Thanks

FAQ: How do I use the SerialPort Class for simple serial communications?

How do I use the SerialPort Class for simple serial communications?Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

MaxStringContentLength Issue with WCF/Silverlight communications

We are having what appears to be a fairly common issue in that we are not able to send requests to our IIS based WCF service that exceed the 8192 MaxStringContentLength default.  I have been through a vast number of posts relating to this issue and have verified and/or addressed the issues of setting the length to a higher number and making sure that our endpoint has a bindingConfiguration that points to the correct binding. I have been looking at this on and off for a number of days and have not made any progress.  If anyone has any suggestions about how to correct the issue it would be massively appreciated.  The following is the pertinent information concerning our configuration and call structure: web.config <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="MyServiceBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> <bindings> <customBinding> <binding name="MyServiceBinding"> <binaryMessageEncoding maxReadPoolSize="2147483647" maxWritePoolSize="2147483647" maxSessionSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength=&qu

How do I connect to SFTP without password from c#

Can anyone help me to connect to the ftp site from c# with following details. for example         I have private key located in c:\IT\abc.ppk         username: abcd         Server type:SFTP         there is no password         Logon Type: Interactive I can connect using above from filezilla. How do I connect from c#. Please give me some idea if anyone knows. Thanks JunaedBD    

SIP communications


Hello everybody,

maby anybody knows, what is the best way (if it is at all) to develop simple application which could login to SIP server and call to some number through SIP server, i need just call, talk and and end talking...

i have searched google but didn't found any free sip components... i tried to use windows messenger, but with no success, becouse in windows messenger api is only one method Phone(), but it can invoke phone window with number that i passed through this method but it doesn't call automatically, i need to press call button optionaly by mouse this isn't good solution for me...

Copy file from SFTP


Hi all,
I need to create an application which copies files from SFTP and paste them on my computer.

Can anyone please tell me how can I do this. I do not want to use any library of other providers like j* or others.


Class for SFTP in .Net Framework 4



Is there any SFTP class available in .NET framework 4.0? 

Thank you,


SFTP Free component developed in C#





i want to upload/download files from SSH server using SFTP. can anyone tell me Is there any free component available for SFTP?







I want to do SFTP using c#. how it can be done ??

class for sftp in .net 2.0

Is there any class available for SFTP in .net framework 2.0? If there is any provision availble in other frameworks
kindly mention in the answer?

how to write a SFTP client ,SFTP server in .net 2.0?is there any option to write it in vc++?

How to change the MS-FTP sample from FTP to SFTP




The FTPSample below from Microsoft is very helpfull to get my application to send a file via FTP to a server.

Now our company is moving from FTP to SFTP and I need to update my application to use not only FTP but also SFTP.


I don't want to use any (paid) 3rd party applications.


I did find the FtpWebRequest.EnableSsl Property but there must be something more than just setting this property to true.


Can someone explain me how to change or what to add to the current MS-FTPSample in VB so that I can also send via SFTP?


Thank you.




This is the MS sample for FTP which I need to get on SFTP:

Private Sub Upload(ByVal fileName As String, ByVal uploadUrl As String)

Dim requestStream

FtpWebRequest + sftp


Hi All,

I need a program that would download all csv files from an sftp location. I've the sftp host IP, user name, password and port details of the sftp location. I am able to login through Filezilla. But as I need to login programmatically, so that I can get a list of all files in the folder.

When the code works fine for a ftp request, it doesn't for an sftp request. Given below is my code to connect to the ftp uri.

FtpWebRequest FtpRequest = (FtpWebRequest)WebRequest.Create("ftp://myuri");
FtpRequest.Credentials = new NetworkCredential("username", "password");
FtpRequest.Method = WebRequestMethods.Ftp.ListDirectoryDetails;

My system admin says that there is no uri that could be given for sftp sites at all. Now, how can I go about this? Is there any third party tool available for this? If yes, suggest me some good ones.

Thanks in advance.







Can anyone give me some direction on how to create a SSIS Package that opens up SFTP/SSH (Ftp) and downloads files to SQL Server/HardDrive.

Now a regular FTP Task will now work if I am correct?

SFTP client library needed


Hi all!

Does anybody know any open source or commercial SFTP library with source code (c#)? I've been trying SharpSsh and found it very unstable and and very poor and durty written. So, I'd rather get another library than fixed the SharpSsh bugs.

What the lib should do: returns folders contents, download files (rather big - may be about 1GB or more), deletes files. Nothing more. Yes, there are several libraries on the marker, all of them look so cool :) The problem is to make right choice. 

Upload files to SFTP



i am facing  a problem in uplaoding files to SFTP...

can anyone supply me with the  code to transfer files to SFTP..



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend