Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Multiple scp targets?



On Thu, Nov 11, 2010 at 12:21, Stephen J. Turnbull <stephen@example.com> wrote:
> Pier Fumagalli writes:
>  > On Nov 11, 2010, at 11:15, "Stephen J. Turnbull" <stephen@example.com> wrote:
>  >
>  > > Pier Fumagalli writes:
>  > >
>  > >> Add "ssh-add -d ...keyfile..." at the end of the script (or in a trap)
>  > >> to make sure the key gets deleted.
>  > >
>  > > If "ssh-add -t" doesn't do that already, we should switch to one that
>  > > does.
>  >
>  > Afaik, -t sets a timeout and deletes the key when said timeout expires.
>  >
>  > Adding also a -d at the end of the script (or in a trap) ensures that the key gets deleted when the script finishes even if the timeout hasn't elapsed yet.
>  >
>  > Call it defensive scripting...
>
> Makes sense.  That would allow a longer timeout, too, or (if in a
> trap) no timeout at all (assuming you trust your shell to execute
> traps properly, which is something I have no expertise on).

Trap works, normally, unless the shell is killed -9. It's basically
the *sh equivalent of "signal (3)".

I'd still put the timeout in there, too, though :)

    Pier


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links