scp without interative password

 

using sshpass instead

sudo apt update

sudo apt install sshpass

 

sshpass -p "password" scp -r user@example.com:/some/remote/path /some/local/path

sshpass -f "/path/to/passwordfile" scp -r user@example.com:/some/remote/path /some/local/path


Reference:
https://stackoverflow.com/questions/50096/how-to-pass-password-to-scp

 

posted @ 2024-10-01 09:45  profesor  阅读(2)  评论(0编辑  收藏  举报