Re: Non-Interactive SFTP

From: Willeat, Todd (TWilleat@MHP.SMHS.COM)
Date: 04/24/03

  • Next message: Willeat, Todd: "Strange networking issue"
    Date:         Thu, 24 Apr 2003 16:40:07 -0500
    From: "Willeat, Todd" <TWilleat@MHP.SMHS.COM>
    To: aix-l@Princeton.EDU
    
    

    Try something like this:

    sftp username@sftpserver << EOF
    cmd1
    cmd2
    cmd3
    ...
    exit
    EOF

    -----Original Message-----
    From: Naylor, Jim [mailto:Jnaylor@SCHNUCKS.COM]
    Sent: Thursday, April 24, 2003 4:04 PM
    To: aix-l@Princeton.EDU
    Subject: Non-Interactive SFTP

    Hello All,
    According to the man pages on SFTP you can use the -b to automate SFTP. The
    -b points to a command file that has the sftp commands. Has anyone been
    able to get SFTP to work in a script form like ftp. We do the following for
    ftp automation:

    echo "user username password" > ftpfile
    echo "cd abcd" >> ftpfile
    echo "get filename" >> ftpfile
    echo "bye" >> ftpfile

    ftp ftpsite < ftpfile

    I have tried to do something similar with SFTP but cannot seem to get it to
    work. This script needs to be run by a user other than the sftp login user.
    According to the man pages I would have to do sftp username@sftpserver. Any
    ideas would be appreciated.

    Thanks,
    Jim Naylor
    Unix Systems Administrator
    Schnuck Markets, Inc.
    * Direct: (314) 994-4784
    *)) Cell: (314) 691-0186
    * Fax : (314) 994-4684
    * jnaylor@schnucks.com


  • Next message: Willeat, Todd: "Strange networking issue"

    Relevant Pages

    • [HPADM] Non-Interactive SFTP
      ... According to the man pages on SFTP you can use the -b to automate SFTP. ... -b points to a command file that has the sftp commands. ... echo "user username password"> ftpfile ...
      (HP-UX-Admin)
    • Non-Interactive SFTP
      ... According to the man pages on SFTP you can use the -b to automate SFTP. ... -b points to a command file that has the sftp commands. ... echo "user username password"> ftpfile ...
      (AIX-L)
    • Re: Cannot access an external SFTP site from behind SBS 2003 R2/ISA 2004! HELP!!!
      ... Base on my further research, using SFTP in Explicit mode goes over port 21, ... built in FTP filter as the commands are encrypted. ... Please open the ISA management console, navigate to Firewall Policy, ... Microsoft CSS Online Newsgroup Support ...
      (microsoft.public.windows.server.sbs)
    • Re: SPAM sudden increase
      ... > Dude was on a tech call with f-secure and the tech asked, "So, ... dude is trying to FTP to their server using WSFTP. ... but I think he is talking about sftp protocol - FTP via ...
      (alt.2600)
    • Secure FTP Factory 5.7 released
      ... JSCAPE is please to announce the release of Secure FTP Factory 5.7. ... Enhancement: Added ASCII file transfer support for sftp servers using ...
      (comp.lang.java.announce)