[CLUE-Tech] Bash and password entry

Matt Gushee mgushee at havenrock.com
Sun Mar 24 13:37:58 MST 2002


Hi, all--

I was wondering how you can handle password entry in a shell script.
I was thinking about writing a script that would synchronize certain
directories on 2 hosts, using scp ... obviously it would be nice not
to have to enter a password/passphrase for each file copied, but I
don't know how (or if) I could store a password in a variable and 
reuse it.

I now realize that for this particular problem the easiest and probably
best solution is just to run the script in an ssh-agent session. But 
I've thought in the past about automating various tasks that involve
passwords, and there isn't always a convenient password-preserving
shell available. Is there a utility you can call from bash to handle
passwords?
-- 
Matt Gushee
Englewood, Colorado, USA
mgushee at havenrock.com
http://www.havenrock.com/



More information about the clue-tech mailing list