linux scp with password

C++
sshpass -p "password" scp -r [email protected]:/some/remote/path /some/local/path

Source

Also in C++: