scp without interative password
using sshpass instead
sudo apt update
sudo apt install sshpass
sshpass -p "password" scp -r /some/local/path user@example.com:/some/remote/path
sshpass -f "/path/to/passwordfile" scp -r /some/local/path user@example.com:/some/remote/path
参考:
https://stackoverflow.com/questions/50096/how-to-pass-password-to-scp