ssh passphrase prompt

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
We normally use ssh-add to not have to enter the passphrase each time.
But in case that the user do not have the private key we would like to
not prompt for passphrase.
In this case we simply would like to be refused from the connection.
We just would like to get a return code of 1 for example.

It is possible ?


Re: ssh passphrase prompt

Quoted text here. Click to load it

If the user doesn't have a private key, then 'ssh' shouldn't prompt for
a passphrase.  I'm not sure if you're asking about 'ssh' or 'ssh-add'.

If you mean you don't want 'ssh' to prompt for a password (not a
passphrase), then you can use '-o PasswordAuthentication=no' (or put the
equivalent in the ssh config file).

If you mean you don't want 'ssh' to prompt for a passphrase when a
private key exists, but when that key is not being handled by the
running agent, you could use '-o BatchMode=yes' (which will prevent any
questions from being asked).

Have I misunderstood what you're asking?

Darren Dunham                                 
Senior Technical Consultant         TAOS   /
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >

Site Timeline