?
Solved

FtpWebRequest.EnableSsl Property

Posted on 2010-01-04
8
Medium Priority
?
812 Views
Last Modified: 2013-12-17
If I set this property to "true", will I be able to upload a file using SFTP?
0
Comment
Question by:rmmarsh
  • 3
  • 2
  • 2
7 Comments
 
LVL 12

Expert Comment

by:jazzIIIlove
ID: 26173624
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
 

Author Comment

by:rmmarsh
ID: 26173751
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
 
LVL 12

Expert Comment

by:jazzIIIlove
ID: 26173843
>>the codeproject link looks like it's for FTPS (am I wrong here?)
You are right.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 57

Expert Comment

by:giltjr
ID: 26275667
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
 

Author Comment

by:rmmarsh
ID: 26275741
giltjr:  I understand that... does .NET support SFTP?  and if so, how?
0
 
LVL 57

Accepted Solution

by:
giltjr earned 2000 total points
ID: 26275801
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
 

Author Closing Comment

by:rmmarsh
ID: 31672518
Thank you... exactly what I was looking for...
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question