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 username@server.com:/path/to/file/singlefile .
Using with ssh
sshpass -p yourpassword ssh username@server.com
No comments:
Post a Comment