Re: SSH password prompt in Shell Script
- From: Darren Tucker <dtucker@xxxxxxxxxxxxxxxx>
- Date: 02 Mar 2006 12:34:25 GMT
On 2006-03-02, Pramod <pramod.shimoga@xxxxxxxxx> wrote:
I need to use ssh to connect different target boxes using Public and
private keys.
Is there is any way in ssh where we can check weather the keys are
already set or not.
Generally if the key based authentication fails it will prompt for
*password*. But in my script I don't want SSH to prompt for password,
just it has to return with failure message.
If you're using OpenSSH: ssh -opreferredauthentications=publickey server.
(or if you're using Protocol 1, PasswordAuthentication=no and/or
ChallengeResponseAuthentication=no). The ssh_config(5) man page has
the details.
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
.
- References:
- SSH password prompt in Shell Script
- From: Pramod
- SSH password prompt in Shell Script
- Prev by Date: SSH password prompt in Shell Script
- Next by Date: Re: ssh X forwarding fails with Linux VPS (Virtual Server)
- Previous by thread: SSH password prompt in Shell Script
- Next by thread: Re: SSH password prompt in Shell Script
- Index(es):
Relevant Pages
|