在Mac OS X上使用Homebrew安装sshpass时,会出现以下提示:
$ brew install sshpass
Error: No available formula for sshpass
We won't add sshpass because it makes it too easy for novice SSH users to
ruin SSH's security.
从提示可知,出于安全考虑,Homebrew禁止安装sshpass。在明确知道安全风险的情况下,如果仍想使用sshpass,我们可以通过如下方式强制安装:
安装:
$ brew install https://raw.github.com/eugeneoden/homebrew/eca9de1/Library/Formula/sshpass.rb
或者:
$ brew install http://git.io/sshpass.rb
安装成功后,就可以正常使用sshpass进行scp了:
$ sshpass -p 'password' scp /path/file username@host2:/path
阅读:955
《在Mac OS X上安装sshpass》上有1条评论