You can do this by going to Preferences > Downloads > Command Line Tools and clicking on the Install button. Once everything is installed and setup you can continue with the installation of sshpass. The sshpass program is an open source project, currently available on sourceforge.
To find the SSH command to use to log in to your Mac from another computer, choose Apple menu > System Preferences, click Sharing , then select Remote Login. The SSH command is shown below the “Remote Login: On” indicator. Allowing remote login to your Mac can make it less secure. See Set up your Mac to be secure.
Install sshpass on Linux Systems In RedHat/CentOS based systems, first you need to enable Epel repository on your system to install it using yum command as shown. On Debian/Ubuntu and its derivatives, you can install it using apt-get command as shown.
What is sshpass? sshpass is a command-line tool that allows you to do non-interactive ssh login. So how is sshpass different for ssh? Well, ssh uses direct TTY access to ensure that an interactive keyboard user issues the password.
There are instructions on how to install sshpass here:
https://gist.github.com/arunoda/7790979
For Mac you will need to install xcode and command line tools then use the unofficial Homewbrew command:
curl -L https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb > sshpass.rb && brew install sshpass.rb && rm sshpass.rb
Some years have passed and there is now a proper Homebrew Tap for sshpass
, maintained by Aleks Hudochenkov. To install sshpass
from this tap, run:
brew install hudochenkov/sshpass/sshpass
Another option in 2020 is this homebrew tap, maintained by esolitos
brew install esolitos/ipa/sshpass
Solution provided by lukesUbuntu from github works for me:
Just use brew
$ brew install http://git.io/sshpass.rb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With