sshpass is a useful tool used for running ssh authentication in non-interactive mode. Using sshpass you can use passwords to ssh or scp command without interactions, which helps to utilize in shell scripts. Instead of using this we recommend using key based authentication.
The sshpass package is available in default packages repositories for most of the latest operating systems. You can use following commands to install it on your system.
sudo apt install sshpass
yum --enablerepo=epel -y install sshpass
sshpass uses SSHPASS environment variable to store user passwords. You need to first SSHPASS variable with password then use this command. Here is a simple shell script using sshpass.
sshpass -e scp testfile.csv firstname.lastname@example.org:/uploads/
You can also run ssh command as following with sshpass.
sshpass -e ssh email@example.com