• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 840
  • Last Modified:

FtpWebRequest.EnableSsl Property

If I set this property to "true", will I be able to upload a file using SFTP?
0
rmmarsh
Asked:
rmmarsh
  • 3
  • 2
  • 2
1 Solution
 
jazzIIIloveCommented:
Hi there;

FtpWebRequest request = WebRequest.Create(ftp://ftpserver/path/filename);

request.Method = WebRequestMethods.Ftp.DownloadFile;
request.EnableSsl = true; // Here you enabled request to use ssl instead of open text
WebResponse response = request.GetResponse();

Please check the followings, too.
http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.enablessl.aspx
http://www.codeproject.com/KB/IP/FTP_Secure.aspx

If you stuck in some point, You can post your code, I will be helping you gladly.

Best regards.
0
 
rmmarshAuthor Commented:
Hmmm... I need SFTP, not FTPS... the codeproject link looks like it's for FTPS (am I wrong here?)

I'm concerned because of all of the stuff I have read this  morning (see quote below), it appears .NET does NOT support SFTP.

"Secure File Transfer Protocol (SFTP) is a protocol for transferring files securely over SSH. Being an integral part of SSH2 family of protocols, SFTP is supported by all SSH servers. SFTP is not related to the original File Transfer Protocol (FTP)."
0
 
jazzIIIloveCommented:
>>the codeproject link looks like it's for FTPS (am I wrong here?)
You are right.
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
giltjrCommented:
SFTP = FTP over a SSH session.  This is a FTP like function over a SSH session.

FTPS = SSL/TSL FTP.  Real FTP with the connections encrypted using SSL/TSL.

These are two different protocols that are 100% incompatible with each other.
0
 
rmmarshAuthor Commented:
giltjr:  I understand that... does .NET support SFTP?  and if so, how?
0
 
giltjrCommented:
MS does not provide SSH support for .NET, thus it does not, can't, support SFTP.  You can find SSH/SFTP components for .NET, here are a few

     http://www.jscape.com/sshfactorydotnet/

     http://www.eldos.com/sbb/sftp-net.php?referer1=google&referer2=adwords_kw_dotnet_sftp_exact&gclid=CJKwkdbRmJ8CFchn5Qod9D4KrQ

     http://www.routrek.co.jp/en/product/varaterm/granados.html

Some are free, some are not.
0
 
rmmarshAuthor Commented:
Thank you... exactly what I was looking for...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now