ssh-add on demand? - SSH

This is a discussion on ssh-add on demand? - SSH ; Is there any program or way to have ssh-add invoked whenever the passphrase for the required key has not already been supplied? Ideally the soltion would also allow for the passphrase to time-out after a while if unused. Am I ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: ssh-add on demand?

  1. ssh-add on demand?

    Is there any program or way to have ssh-add invoked whenever the
    passphrase for the required key has not already been supplied? Ideally
    the soltion would also allow for the passphrase to time-out after a
    while if unused.

    Am I asking too much?

    Thanks.


  2. Re: ssh-add on demand?

    alan.larkin@gmail.com wrote:
    > Is there any program or way to have ssh-add invoked whenever the
    > passphrase for the required key has not already been supplied? Ideally
    > the soltion would also allow for the passphrase to time-out after a
    > while if unused.
    >
    > Am I asking too much?
    >
    > Thanks.


    There are ways to set up keychain. But when do you want it to ask for the
    keys? And how should it trigger a request for the reloading of it?



  3. Re: ssh-add on demand?

    Nico Kadel-Garcia wrote:
    > alan.larkin@gmail.com wrote:
    > > Is there any program or way to have ssh-add invoked whenever the
    > > passphrase for the required key has not already been supplied? Ideally
    > > the soltion would also allow for the passphrase to time-out after a
    > > while if unused.
    > >
    > > Am I asking too much?
    > >
    > > Thanks.

    >
    > There are ways to set up keychain. But when do you want it to ask for the
    > keys? And how should it trigger a request for the reloading of it?


    Well like I said, I would like it to ask for the keys only as required,
    i.e. it should ask for a passphrase the first time ssh is run (assuming
    the target ssh server has a corresponding public key - which leads me
    to think this might only be possible by merging ssh/ssh-agent and
    ssh-add). Subsequently that passphrase should not be required, a la
    normal ssh/ssh-add behaviour. The time out would just be an added
    bonus.

    Nonsense, feasible, or existing?


  4. Re: ssh-add on demand?


    wrote in message
    news:1154592598.717898.14020@m73g2000cwd.googlegro ups.com...
    > Nico Kadel-Garcia wrote:
    >> alan.larkin@gmail.com wrote:
    >> > Is there any program or way to have ssh-add invoked whenever the
    >> > passphrase for the required key has not already been supplied? Ideally
    >> > the soltion would also allow for the passphrase to time-out after a
    >> > while if unused.
    >> >
    >> > Am I asking too much?
    >> >
    >> > Thanks.

    >>
    >> There are ways to set up keychain. But when do you want it to ask for the
    >> keys? And how should it trigger a request for the reloading of it?

    >
    > Well like I said, I would like it to ask for the keys only as required,
    > i.e. it should ask for a passphrase the first time ssh is run (assuming
    > the target ssh server has a corresponding public key - which leads me
    > to think this might only be possible by merging ssh/ssh-agent and
    > ssh-add). Subsequently that passphrase should not be required, a la
    > normal ssh/ssh-add behaviour. The time out would just be an added
    > bonus.
    >
    > Nonsense, feasible, or existing?


    The timeout and "on-demand" business make it interesting. What it sounds
    like you really want is a wrapper for for the SSH and SCP and SFTP clients,
    to only whine about the key if you happen to be at a console and otherwise
    to simply call the SSH binary. I'm not aware of anyone having written this,
    but it should be child's play to detect whether you are at a tty and do
    appropriate things. I'd put it in your ~/bin directory, to keep it out of
    other user's way.



+ Reply to Thread