Friday, April 26, 2013

scp or rsync with plain password using sshpass

Sometimes i don't care with security, i just want to put my password inside my script (hard code), why? Because i need to run that script automatically. If you face same problem with me, then you lucky came to my blog. The solution is simple, use sshpass, download and compile it, then run it.

Using with scp (not like rsync, scp does not support plain password)
sshpass -p yourpassword scp .

Using with ssh
sshpass -p yourpassword ssh

No comments: