Sheell Script for SFTP

From: Venkat (khvenkat_at_cisco.com)
Date: 09/01/05


Date: Thu, 1 Sep 2005 20:05:18 +0530

Hi All,

I am looking for a shell script for SFTP a file and not prompting for the
password.
I wrote the small script but it doesn't work. I am trying to download the
file by name test located at /root directory on System with IP 10.77.31.202.
The userid and password of 10.77.31.202 is root and venkat. Could some one
correct this please.

#! /bin/sh

HOST='10.77.31.202'
USER='root'
PASSWD='venkat'

ftp $HOST
user ${USER} ${PASSWD}

cd /root/
get test

exit 0

Regards,
Venkat



Relevant Pages

  • Re: Sheell Script for SFTP
    ... >I am looking for a shell script for SFTP a file and not prompting for the ... user $${PASSWD} ...
    (alt.os.linux.redhat)
  • Re: OpenSSH question : password prompt when scripting
    ... carry over to the shell script. ... Does your shell script only contain the line: sftp ... Subject: OpenSSH question: password prompt when scripting ... But if I run the exact same command as a script, ...
    (AIX-L)
  • sftp non interactive session
    ... I want to use sftp in a cron job (shell script) so obvously I do not want to ... I have seen solutions such as using ...
    (comp.unix.solaris)
  • Re: sftp non interactive session
    ... > I want to use sftp in a cron job (shell script) so obvously I do not want to ... Lazy Canadian. ...
    (comp.unix.solaris)
  • Re: Sheell Script for SFTP
    ... I would give up trying to right a shell script to interact ... with interactive programs. ... There's too many pitfalls. ... Look at the man page for sftp, I'm not sure what you're trying to do ...
    (alt.os.linux.redhat)