The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help needed for Shell Script..... pulkit Shell Programming and Scripting 0 02-22-2008 07:25 AM
shell script Help Needed!! smallu UNIX for Dummies Questions & Answers 0 01-15-2008 08:40 PM
2 ftps in script, second won't go to output file brdholman UNIX for Dummies Questions & Answers 4 11-15-2007 03:18 PM
Help needed in Shell Script nvuradi Shell Programming and Scripting 1 10-24-2007 05:56 AM
shell script help needed fastgoon Shell Programming and Scripting 3 07-17-2006 04:24 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-20-2007
vidhya_vec vidhya_vec is offline
Registered User
  
 

Join Date: May 2007
Posts: 8
Help needed in shell script for FTPS

Hi,
Im trying to build a script to download files from a secure FTP site.

When I run the command ftps <host_address> in the unix prompt, it asks username and password, and then prompts the following question.
Do you want to trust this certificate? [y|n|a](y):
From the prompt, I am able to type 'y'(Yes) and then it is connecting to the FTP site without any issue.

When i run the shell script which contains the same command (ftps <host_address>), it prompts the same question. Since I am not able to enter during execution of the script, it says 'Connection aborted' and then comes out of the program.

Could anyone tell me how to avoid this prompt
or
How to enter 'y' during execution, Do i need to pass it as an argument in the command line?

Thanks,
Vidhya
  #2 (permalink)  
Old 05-20-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Install the remote certificate as acceptable locally so sftp finds it locally and trusts it, otherwise you may blithely trust any certificate.
  #3 (permalink)  
Old 05-20-2007
vidhya_vec vidhya_vec is offline
Registered User
  
 

Join Date: May 2007
Posts: 8
Can u pls tell me how to install the certificate in the local machine?
Im new to this.

Thanks.
  #4 (permalink)  
Old 05-20-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Is it an actual certificate or an entry to known hosts that it is complaining about?

Have a read of this... SFTP

I would expect that you need an entry in your .ssh/known_hosts for the server and the server needs your public key in it's .ssh/authorized_keys for the user you want to log in as. You would also need to provide a non-password protected private key to the sftp client.
  #5 (permalink)  
Old 05-20-2007
vidhya_vec vidhya_vec is offline
Registered User
  
 

Join Date: May 2007
Posts: 8
You told me another option that I can blithely trust any certificate..
Could you please tell me how to do that?

Thanks
  #6 (permalink)  
Old 05-20-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
What options are you using so far?

How are you authenticating?

Can you give us the exact sftp line in your script?
Closed Thread

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:36 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0