1.先按照要求安装完homebrew,参考这里
2. 由于macOS系统的安全验证问题,安装sshpass组件请参考如下代码
# 出现上述报错可以下载至本地再次执行安装
wget https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb brew install sshpass.rb
3. sshpass的使用格式
sshpass -p "password" scp -r [email protected]:/some/remote/path /some/local/path