sftp script running through crontab

From: Hideki Machida (jap_e2k_at_hotmail.com)
Date: 05/21/03

  • Next message: alex one: "Fwd: RE: heimdal and ssh"
    Date: 21 May 2003 09:56:06 -0000
    To: secureshell@securityfocus.com
    
    
    ('binary' encoding is not supported, stored as-is)

    This is the script that I am using.

    ---------------------------------------------------------
    #!/bin/sh

    DIR="/DIR"
    LDIR="/LDIR"
    LOG=aaa.gz
    list="aaa.txt"

    for i in `cat $list`
    do

    /usr/local/bin/sftp account@hostname <<EOF>/dev/null
              cd $i/$DIR
              lcd $i/$LDIR
              mput $LOG
              quit
    EOF

    done
    -----------------------------------------------------------

    The system is HP-UX.

    Now the problem I am having is that when running this directly it executes
    without a problem, yet when this is executed though cron it comes with the
    following error.

    $./script.sh
    Warning: tcgetattr failed in ssh_rl_set_tty_modes_for_fd: fd 1: Not a
    typewriter

    If anybody can shed some light on this issue it would be of great help.


  • Next message: alex one: "Fwd: RE: heimdal and ssh"

    Relevant Pages

    • Re: John Resig Video
      ... that it should only be used on script resources where it ... That fulfills the "doesn't matter when it executes" statement. ... And in environments were defer is not implemented that same script is going to processed inline and so be executed before the DOM is complete, which could still happen even if defer is implemented as "can continue ...
      (comp.lang.javascript)
    • Files appear to be cross linked
      ... script requires a number of standard environment variables to be set ... so it calls a second shell script to set these at the session level, ... control should return to the first shell script, ... that the script executes to the last line prior to the displaying of ...
      (comp.unix.solaris)
    • Re: John Resig Video
      ... Modern browsers perform parallel downloads. ... The statement I was commenting on came at the end of a paragraph that commenced "The defer attribute tells the parser that it can continue downloading and rendering the page", so an example that does not feature the DEFER attribute seems to serve no purpose as a clarification of what you were talking about. ... That fulfills the "doesn't matter when it executes" statement. ... It would be somewhat desirable to have better control over script ...
      (comp.lang.javascript)
    • Permission to execute jobs but nothing else
      ... This script is executed by a scheduled SQL job which ... executes a CSCRIPT command pointing to this script on the ... to me as long as I can setup a weak Login ID that can do ...
      (microsoft.public.sqlserver.security)
    • Re: How about a stupid question?
      ... it reads it and executes it. ... > 2) if the shell is run as a non-login, interactive shell, it only attempts to ... > 3) When bash is started non-interactively, to run a shell script, for example, ...
      (comp.unix.solaris)