Reg sftp in shell script | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


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

Reg sftp in shell script

Shell Programming and Scripting


Tags
shell script, shell scripting, unix scripting, unix scripting basics

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-05-2007
vidhya_vec vidhya_vec is offline
Registered User
 
Join Date: May 2007
Last Activity: 11 June 2007, 5:48 PM EDT
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Reg sftp in shell script

Hi,
I want to retrieve files from an sftp site and place it a directory in unix server.
When I try to connect, it is asking password even if i hardcode it in the script.I want to automate the script. Could anyone tell me how to avoid password prompt.

#!/bin/sh
# sample automatic ftp script to dump a file
sftp user@host << EOF
lcd /apps/MFG_BCPSITE/Temp
mget *
quit
EOF


Thanks,
Vidhya
Sponsored Links
    #2  
Old 06-05-2007
aigles's Avatar
aigles aigles is offline Forum Advisor  
Registered User
 
Join Date: Apr 2004
Last Activity: 20 January 2014, 5:51 AM EST
Location: Bordeaux, France
Posts: 1,711
Thanks: 2
Thanked 61 Times in 57 Posts
Have you tried to search forums before posting ?
Seems that they are many threads about sftp and password problems

automate sftp using unix script (
How to give passwd along with sftp.
how to give sftp a password in a shell scripit
SFTP in batch mode
. . .


Jean-Pierre.
Sponsored Links
    #3  
Old 06-05-2007
vidhya_vec vidhya_vec is offline
Registered User
 
Join Date: May 2007
Last Activity: 11 June 2007, 5:48 PM EDT
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by aigles
Have you tried to search forums before posting ?
Seems that they are many threads about sftp and password problems

automate sftp using unix script (
How to give passwd along with sftp.
how to give sftp a password in a shell scripit
SFTP in batch mode
. . .


Jean-Pierre.
Hi,
I did search the forum.But they use SSH-Keygen for authentication,I am using OpenSSH.
keygen command is not working in my unix box.

Thanks.
    #4  
Old 11-25-2008
phani1312 phani1312 is offline
Registered User
 
Join Date: Nov 2008
Last Activity: 28 January 2010, 10:21 PM EST
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Phani1312

what is your sftp server os?
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SFTP Shell script Arpit Narula Shell Programming and Scripting 2 03-23-2012 05:59 AM
SFTP-how to log individual sftp command error while executing shell script noobrobot Shell Programming and Scripting 1 10-09-2011 07:17 PM
SFTP to server through Shell Script Kishore_1 Shell Programming and Scripting 1 12-29-2010 10:36 AM
Shell Script for SFTP rupeshk Shell Programming and Scripting 4 09-27-2008 07:22 PM
SFTP shell script help madankumar Shell Programming and Scripting 1 07-26-2008 08:34 AM



All times are GMT -4. The time now is 08:22 AM.