On Sat, Apr 21, 2007 at 03:34:36PM -0500, [EMAIL PROTECTED] wrote:
> when using ssh in a ksh script where previously configured public key auth
> is expected but not always the case, i want to have ssh commands that
> prompt for a password to be handled as errors and exit the script. the
> idea is to not have anyhing printed to the console and to exit with a
> non-zero error code instead of a password prompt, etc.
> 
> clues on how to do this are appreciated.

I'm not 100% sure what you're asking, but if you mean that you want ssh
to fail if it needs password authentication then use the
"PasswordAuthentication no" option setting. You can do that in
~/.ssh/config, or on the ssh command line with the "-o" option. See man
pages ssh(1) and ssh_config(5).

-- 
Darrin Chandler            |  Phoenix BSD User Group  |  MetaBUG
[EMAIL PROTECTED]   |  http://phxbug.org/      |  http://metabug.org/
http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation

Reply via email to