Friday, April 15, 2022

[SOLVED] How to install sshpass on Mac?

Issue

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.


Solution

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


Answered By - JSimonsen
Answer Checked By - Marie Seifert (WPSolving Admin)