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
- Next message: MikesBrain: "Port 22 SNAFU? Help!"
- Previous message: Richard E. Silverman: "Re: ftpusers file or similar for openssh"
- In reply to: Darren Dunham: "Re: Have Script Deal with SSH/SCP password Prompt"
- Next in thread: cevans81_at_gmail.com: "Re: Have Script Deal with SSH/SCP password Prompt"
- Reply: cevans81_at_gmail.com: "Re: Have Script Deal with SSH/SCP password Prompt"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- Next message: MikesBrain: "Port 22 SNAFU? Help!"
- Previous message: Richard E. Silverman: "Re: ftpusers file or similar for openssh"
- In reply to: Darren Dunham: "Re: Have Script Deal with SSH/SCP password Prompt"
- Next in thread: cevans81_at_gmail.com: "Re: Have Script Deal with SSH/SCP password Prompt"
- Reply: cevans81_at_gmail.com: "Re: Have Script Deal with SSH/SCP password Prompt"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|