Mailing List Archive


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

Re: [tlug] Multiple scp targets?



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).


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links