[vox-tech] [OT] Pumping a password using Expect

Ken Bloom kbloom at gmail.com
Thu Jan 5 19:48:10 PST 2006


On Thu, Jan 05, 2006 at 06:33:40PM -0700, timriley wrote:
> How do you have a crontab executed process using Expect
> pump a password to another computer?

Is this an SSH password you're giving it? If so, try using an SSH
keypair for authentication. A passwordless key is no less secure than
having the password in the expect file (it's probably more secure),
and you can even create single-purpose keys that can only be used to
run a single command (see http://www.arches.uga.edu/~pkeck/ssh/,
scroll down to "Single-purpose keys")

Also, you can try just a simpler regexp for the password. I know very
little about expect scripts -- only in the context of having seen it
in old PPP tutorials -- but they never used a full expression to
expect logins and password. For login they always used "ogin:" and for
password they always ued "word:". This would avoid capitalization
differences.

--Ken Bloom

-- 
I usually have a GPG digital signature included as an attachment.
See http://www.gnupg.org/ for info about these digital signatures.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://ns1.livepenguin.com/pipermail/vox-tech/attachments/20060105/7ef2d42b/attachment.pgp


More information about the vox-tech mailing list