BatchMode is an option that says "Hey, there is no person to answer a password 
prompt, so quit if one is needed."  This allows batch scripts to continue 
instead of hanging if something doesn't work and it falls back to 
PasswordAuthentication.

What you need to do is setup public key access with RSAAuthentication.  On the 
client, generate a public/private key pair with the ssh-keygen program.  Then 
put the .pub file info into the authorized_keys, authorized_keys2, or file 
pointed to by the authority file.  Which it goes in depends on the version 
running on the remote server machine.  If OpenSSH, then something like this:

Client:
        1) ssh-keygen -t dsa -f ~/.ssh/batch_dsa -N""
        2) Copy ~/.ssh/bacth_dsa.pub to server machine

Server:
        1) append contents of copied file to ~/.ssh/authorized_keys2
        
Now run from client as:

        ssh -i ~/.ssh/batch_dsa Remote_CmdLine

If either the client or the server or both are ssh.com servers, then this will 
change slightly,  The keygen options would be different, the location of files 
may change and the v2 dsa .pub file may need to be converted to the others 
format.  For the .pub file, the info is the same, but the contents are saved in 
a different format for v2 between OpenSSH and ssh.com.

If either the client or server is an ssh.com server, then repost more about your 
client and server and I can give more detailed info.

        --Dave

>From: "Trevor Stuart" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: BatchMode question
>Date: Wed, 18 Jul 2001 10:48:09 +0100
>MIME-Version: 1.0
>Content-Transfer-Encoding: 7bit
>X-Priority: 3 (Normal)
>X-MSMail-Priority: Normal
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
>Importance: Normal
>
>I would like to use scp under cron to securely copy a file from one machine
>to another.
>The SSL_CONFIG files talk about BatchMode yes but I am unable to find out
>any more about this
>option. How does it get the remote password? Are there any other
>configuration requirements?
>
>Any help anyone can give me will be most appreciated.
>
>Thanks,
>
>Trevor Stuart
>

--
David Knight French                           
Black Mountain Computer Consulting
Voice: (858)573-2959
Email: [EMAIL PROTECTED]

Reply via email to