How to install sshpass on mac?

前端 未结 7 576
别那么骄傲
别那么骄傲 2020-12-12 13:30

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

相关标签:
7条回答
  • 2020-12-12 13:46

    Another option in 2020 is this homebrew tap, maintained by esolitos

    brew install esolitos/ipa/sshpass
    
    0 讨论(0)
  • 2020-12-12 13:48

    Solution provided by lukesUbuntu from github works for me:

    Just use brew

    $ brew install http://git.io/sshpass.rb
    
    0 讨论(0)
  • 2020-12-12 13:51

    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
    
    0 讨论(0)
  • 2020-12-12 13:54

    For the simple reason:

    Andy-B-MacBook:~ l.admin$ brew install sshpass
    Error: No available formula with the name "sshpass"
    We won't add sshpass because it makes it too easy for novice SSH users to
    ruin SSH's security.
    

    Thus, the answer to do the curl / configure / install worked great for me on Mac.

    0 讨论(0)
  • 2020-12-12 14:06

    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
    
    0 讨论(0)
  • 2020-12-12 14:06

    Following worked for me

    curl -O -L  https://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz && tar xvzf sshpass-1.06.tar.gz
    cd sshpass-1.06/
    ./configure
    sudo make install
    
    0 讨论(0)
提交回复
热议问题