[Help me] sftp script... - SSH

This is a discussion on [Help me] sftp script... - SSH ; I used get.sh script in AIX machine, but I shoud use sftp. How can I make a sftp scipt including password ? (script file includes 1,2,3 procedure) Please help me~ Thanks in advance. ===== get.sh ===== ftp -i -n 123.456.678.111 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [Help me] sftp script...

  1. [Help me] sftp script...

    I used get.sh script in AIX machine, but I shoud use sftp.

    How can I make a sftp scipt including password ? (script file includes 1,2,3
    procedure)

    Please help me~

    Thanks in advance.



    =====
    get.sh
    =====
    ftp -i -n 123.456.678.111 << end
    user test test
    cd /users/test
    get test.txt test.txt

    bye




    1. sftp -b sget_date test@123.456.678.111

    2. Prompt for input password

    3. Run sftpget.sh

    =====
    sftpget.sh
    =====
    cd /users/test
    get test.txt test.txt

    exit



  2. Re: [Help me] sftp script...


    > I used get.sh script in AIX machine, but I shoud use sftp.
    > How can I make a sftp scipt including password ? (script file includes 1,2,3
    > procedure)


    Most sftp software is designed to accept a password only from a tty, so
    you would have to use a tool like Expect. A better idea is to use a
    different authentication method that allows for automatic usage, such as
    hostbased or plaintext publickey (no passphrase). See:

    http://www.snailbook.com/faq/no-passphrase.auto.html

    - Richard

+ Reply to Thread