Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and 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 Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 Unix and Linux 06-05-2007
aigles's Unix or Linux Image
aigles aigles is offline Forum Advisor  
Registered User
 
Join Date: Apr 2004
Last Activity: 1 December 2014, 9:03 AM EST
Location: Bordeaux, France
Posts: 1,711
Thanks: 2
Thanked 62 Times in 58 Posts
Unix or Linux Image 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 Unix and Linux 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
Unix or Linux Image 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 Unix and Linux 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 Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image 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 07:57 PM.