- You want to use scp or ssh in a script but you can pass the password in the call
If you want to use ssh or scp in a script they ask for a password which you can not supply while running automatically. For this specific problem i use sshpass. This that you can easily provide the password.
Install (for Ubuntu/Debian)
sudo apt-get install sshpass
sshpass -p ‘strongPassword’ ssh email@example.com command_to_run
sshpass -p ‘strongPassword’ scp *.tar.gz firstname.lastname@example.org:/home/user