FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 21st, 2006, 04:14 PM
OnlyTheMan OnlyTheMan is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 1 OnlyTheMan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 25 sec
Reputation Power: 0
Ftp using certificate without username and password

Hello all,

I have a valid ftp certificate that will not expire for three years. THe problem is that my username and password change every 30 days. I need to write a program to upload a file via ftp that does not allow "anonymous" username and I want to use the certificate to authenticate without needing to ever enter the username and password. I have tried using Dart's SecureFtp Object, Microsoft's FtpWebResponse object, the SSL Stream Object, and the WebClient Object, all of which require a username and password to be entered in order to login to the ftp site.

I do not know much about the underlying FTP protocol. Is it even theoretically possible to perform ftp using only a certificate for authentication? How can it be done in any programming language?

Any help is appreciated.

OTM

Reply With Quote
  #2  
Old April 24th, 2006, 09:16 AM
martinvobr martinvobr is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 2 martinvobr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 27 m 56 sec
Reputation Power: 0
Hi,
you could use Rebex Secure FTP for .NET - the sample below is taken from the http://www.rebex.net/secure-ftp.net/tutorial.aspx

(see "Authenticating the client using a certificate" section)

Ftp ftp = new Ftp();

// Create an instance of TlsParameters class and
// set the certificate request handler to
// CertificateRequestHandler.StoreSearch.
// You also have to specify the common name of
// the FTP server if you provide your own parameters.
TlsParameters par = new TlsParameters ();
par.CertificateRequestHandler = CertificateRequestHandler.StoreSearch;
par.CommonName = hostname;

// Connect securely using explicit SSL.
// The third argument refers to the parameters class.
ftp.Connect (hostname, 21, par, FtpSecurity.Explicit);

// Connection is protected now, we can log in safely.
// Some servers may not require login if the client
// successfully authenticated itself using a certificate
// known to the server.
ftp.Login (username, password);

The last line could be ommited. Make sure, that ftp server is configured to allow autneticating with client certificate only.

Martin

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > Ftp using certificate without username and password


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT