sftp automation - SSH

This is a discussion on sftp automation - SSH ; I have a script that basically does an sftp. The password is recognised by the system and does not require to be added. #script sftp sftp abc123@intel.com mput * bye How come the script does not run? it does connect ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: sftp automation

  1. sftp automation

    I have a script that basically does an sftp. The password is
    recognised by the system and does not require to be added.

    #script sftp
    sftp abc123@intel.com
    mput *
    bye

    How come the script does not run? it does connect and just waits at
    the sftp prompt.
    It does not trigger the mput * command.

    Is there a way to automate this?

  2. Re: sftp automation

    rogv wrote:
    > I have a script that basically does an sftp. The password is
    > recognised by the system and does not require to be added.
    >
    > #script sftp
    > sftp abc123@intel.com
    > mput *
    > bye
    >
    > How come the script does not run? it does connect and just waits at
    > the sftp prompt.
    > It does not trigger the mput * command.
    >
    > Is there a way to automate this?



    your script tries to execute the sftp commands as shell comands after
    the sftp process ends.
    if you use bourne or bash shell do this:

    sftp host << EOI
    sftp commands
    EOI

    or look up sftp -b Option

    J. Gann

  3. Re: sftp automation

    On Oct 3, 12:18*pm, Joachim Gann wrote:
    > rogv wrote:
    > > I have a script that basically does an sftp. *The password is
    > > recognised by the system and does not require to be added.

    >
    > > #script sftp
    > > sftp abc...@intel.com
    > > mput *
    > > bye

    >
    > > How come the script does not run? *it does connect and just waits at
    > > the sftp prompt.
    > > It does not trigger the mput * command.

    >
    > > Is there a way to automate this?

    >
    > your script tries to execute the sftp commands as shell comands after
    > the sftp process ends.
    > if you use bourne or bash shell do this:
    >
    > sftp host << EOI
    > sftp commands
    > EOI
    >
    > or look up sftp -b Option
    >
    > J. Gann


    Thank you that works

+ Reply to Thread