命令行中scp带密码

wget http://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/sshpass-1.06-1.el7.x86_64.rpm && rpm -ivh sshpass-1.06-1.el7.x86_64.rpm

sshpass -p "pass" scp -o StrictHostKeyChecking=no -P 1234 filename username@ip:/root

你可能感兴趣的:(命令行中scp带密码)