Re: Have Script Deal with SSH/SCP password Prompt

From: Stein Arne Storslett (sastorsl_at_THOU.SHALT.NOT.SPAM.broadpark.no)
Date: 08/17/05


Date: Wed, 17 Aug 2005 05:47:30 GMT


<ddunham@redwood.taos.com> wrote in <kAqMe.19$GV7.4@newssvr25.news.prodigy.net>:
> cevans81@gmail.com wrote:
>> I would much rather prefer my script to write to an error log, then
>> continue with its business.
>
>> Any ideas on how I can get my script to deal with the password prompt?
>
> -o BatchMode=yes (or put it in a config file used by that scp).
>
> BatchMode
> If set to ``yes'', passphrase/password querying will be disabled.
> This option is useful in scripts and other batch jobs where no
> user is present to supply the password. The argument must be
> ``yes'' or ``no''. The default is ``no''.
>

With scp you can do "scp -B -i ....". -B for batch mode.

A good idea would be to check for an exit code other than 0 (zero), and
automate an email or other to warn you about the error.

-- 
Stein Arne


Relevant Pages

  • RSJ system malfunctions when run automatically
    ... I use Object Desktop's Scheduler Folder to run the script shown below once a week to backup my personal data. ... In the past it would glitch now and then and I'd have to run the RSJ commands manually but over the last couple of months it fails consistently and I have to do it everytime. ... On this occasion the error log popped up when the last line of the script was running, i.e. when cdattach was closing the CD and finalising the session. ...
    (comp.os.os2.misc)
  • RE: use DBI in perl cgi script
    ... If you can do that then you can see what comes out in the error log as ... This is a DBI mailing ... use DBI in perl cgi script ... intended for the named addressee (or a person responsible for delivering it to ...
    (perl.dbi.users)
  • Re: script dies yet there are no errors in error log
    ... This script dies after processing about 20 or 25 numbers, yet it leaves no errors in the error logs. ... More information about this error may be available in the server error log. ... the input could not be more simple, just a bunch of UPC codes, one per line: ...
    (comp.lang.php)
  • Re: script dies yet there are no errors in error log
    ... The server encountered an internal error or misconfiguration and was ... no errors show up in PHP error log. ... If I run the "top" command while this script is executing, ... This is true even if I run it against UPCs ...
    (comp.lang.php)
  • Re: Newbie Question
    ... error log and access log. ... script and final output. ... you're also going to need to post the relevant Apache configuration files. ... I'm also concerned that you are conflating mod_python with Python CGI, ...
    (comp.lang.python)