- 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 firstname.lastname@example.org command_to_run
sshpass -p ‘strongPassword’ scp *.tar.gz email@example.com:/home/user