Mailing List Archive


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

Re: [tlug] Auto fill password in shell script? [SOLVED]



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

Home Page Mailing List Linux and Japan TLUG Members Links