Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

12
  • 4
    Althought is not recommended and not a good practice this is exactly the answer to the question. Consider using keys as stated above. But if there's a major tech issue this is the solution asked Commented Mar 15, 2013 at 17:14
  • 21
    I only upvote the answer. Not "rational why don't you do it this way instead" answers. Just the answer. hence, I upvoted you :) Commented Mar 2, 2014 at 1:05
  • 1
    I don't completely hate sshpass, in fact I'm using it on a temporary basis. However using '-p' is unnecessary and undesirable. Set the variable SSHPASS first and then do sshpass -e ssh <ssh-args>. Commented Mar 23, 2015 at 19:59
  • 1
    @Brad If you have root on the box, you can install sshpass using yum --enablerepo=epel install sshpass. Commented Oct 12, 2015 at 10:40
  • 1
    This answer also works on Manjaro (Arch-based). Commented Jan 18, 2021 at 0:28