Skip to main content

Install sshpass on Mac

Hello everyone! I found the way to install sshpass on MacOS. I write the note for help you.

You needs to install builder tools first and running.

curl -O -L https://fossies.org/linux/privat/sshpass-{version}.tar.gz && tar xvzf sshpass-{version}.tar.gz
cd sshpass-
{version}./configure
sudo make install

and you can test sshpass by
% sshpass
Usage: sshpass [-f|-d|-p|-e] [-hV] command parameters
   -f filename   Take password to use from file
   -d number     Use number as file descriptor for getting password
   -p password   Provide password as argument (security unwise)
   -e            Password is passed as env-var "SSHPASS"
   With no parameters - password will be taken from stdin

   -P prompt     Which string should sshpass search for to detect a password prompt
   -v            Be verbose about what you're doing
   -h            Show help (this screen)
   -V            Print version information
At most one of -f, -d, -p or -e should be used

*Note

You need to find {version} from https://sourceforge.net/projects/sshpass/files/sshpass/ and find the latest version.

Example: I found the 1.09 is the latest version. I will replace {version} with 1.09.

curl -O -L https://fossies.org/linux/privat/sshpass-1.09.tar.gz && tar xvzf sshpass-1.09.tar.gz
cd sshpass-
{1.09./configure
sudo make install

Comments