Use sshpass :
sshuses direct TTY access to make sure that the password is indeed issued by an interactive keyboard user.sshpassrunssshin a dedicated tty, fooling it into thinking it is getting the password from an interactive user.
sshpass -p 'password' scp -r [email protected]:/some/remote/path /some/local/path
Você também pode usar sshpass com ssh , rsync e scp .