2

I'm able to connect to sftp site using username and password by using below code:

FtpWebRequest reqFTP;
reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + ftpURI + "/" + clientFolder + "/"));
reqFTP.UseBinary = true;
reqFTP.Credentials = new NetworkCredential(ftpUserID, ftpPassword);

But I'm not able to connect to sftp using username and .ppk file (putty private key file) and no password by using in built library of c#. Can you please help me by giving a small example to conner to sftp using .ppk file, I don't want to use third party library.

techExplorer
  • 810
  • 7
  • 16
  • FTP knows nothing of keys; it's a completely different protocol. SFTP might be what you wasn't but I don't think there's any native .NET support for it. – Joe May 29 '13 at 10:23
  • http://stackoverflow.com/questions/530330/sftp-libraries-for-net might be helpful. – Joe May 31 '13 at 11:43

0 Answers0