How to install sshpass on mac?

Alt picture Alt · Aug 27, 2015 · Viewed 101.7k times · Source

I would like to automate ssh login from my mac.

It does have a simple solution:

sshpass -p my_password ssh m_username@hostname

but my problem is installing sshpass on my mac.

Answer

JSimonsen picture JSimonsen · Aug 27, 2015

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:

brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb