Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Auto fill password in shell script? [SOLVED]
- Date: Tue, 01 Feb 2011 15:04:32 +0900
- From: Dave M G <dave@example.com>
- Subject: Re: [tlug] Auto fill password in shell script? [SOLVED]
- References: <4D4671BA.2030504@example.com> <AANLkTi=+MMxt_RH6GZ4Ke3pf2jHZa=8Yc1V23z3Np4CP@example.com>
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7
Romeo, Sweet! I parsed down the guys script, and eventually figured out that all you really need is the "expect" command (which I had to install with apt-get). Example using "ls -la" as the command one wants to run on the remote server: expect -c " spawn ssh $sshusername@example.com -p $sshport ls -la match_max 100000 expect \"*?assword:*\" send -- \"$sshpassword\r\" send -- \"\r\" expect eof " Thanks for that link. Did just the trick! -- Dave M G
Home | Main Index | Thread Index
- Next by Date: [tlug] Auto fill password in shell script?
- Next by thread: [tlug] Auto fill password in shell script?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links