Link to home
Start Free TrialLog in
Avatar of DanRaposo
DanRaposoFlag for United States of America

asked on

Silmulate keystrokes in bash script

Hi experts,

I was wondering if someone could help me out with a bash script.

I have script that simply does an scp

scp *.js root@192.168.0.229:/

Is there a way to add the password info and enter key to the bash script so I don't have enter it everytime I run the script?

Thanks!
Avatar of ravenpl
ravenpl
Flag of Poland image

First of all try http://www.google.com/search?q=ssh+without+password to omit password
openssh tries as hard as it can to avoid reading password from non terminal input.
So You could try expect script instead ...
Avatar of slyong
slyong

just providing the link for expect http://expect.nist.gov/
ASKER CERTIFIED SOLUTION
Avatar of root_start
root_start
Flag of Brazil image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial