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: 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)
  • Re: Attribute Parameter Problem with bind_param( )
    ... I'm using the same DBI version on both, ... prompt. ... parameter problem in one of the methods called in the script. ... Here is the error from the error log: ...
    (comp.lang.perl.misc)
  • Re: Trouble with Perl on Apache
    ... Here's the script I'm currently trying: ... Apache/2.0.50 and Perl v5.8.3 Suse 9.1 ... actually checked the server error log, ... Have you seen the posting guidelines? ...
    (comp.lang.perl.misc)