brew won't install sshpass. Is there a workaround?

I'm running big sur and want to use sshpass but apple won't let me install it. What alternatives are there? I fully understand the security implications but they don't really apply in my situation. Some of my colleagues use Linux workstations to connect to servers and they all use sshpass.


I want to avoid having to remember, and then type, long passwords for the Linux servers I connect to. I suppose I could use expect. but maybe Apple will block that as well.

MacBook Pro 16″, macOS 11.6

Posted on Apr 6, 2022 5:06 PM

Reply
5 replies

Apr 7, 2022 6:24 AM in response to rkg1945

Some of my colleagues use Linux workstations to connect to servers and they all use sshpass.


Is there a reason you can't or don't want to connect to a server in the usual manner?


macOS saves passwords if you want it to, and it shouldn't matter what OS the server is running. As you determined even Linux imposes what often appear to be unreasonable security restrictions, "for your own good".

Apr 7, 2022 8:54 AM in response to John Galt

@John_Galt. If by the "usual manner" you mean typing ssh user@ip_address and then typing the password after being prompted, that's exactly what I do. However I wanted a script with a short name that would do all the work for me by just typing the script name. Using sshpass in a script would accomplish that.


I was not familiar with the technique that etresoft suggested, but after researching it, it is what I now use. So thank you etresoft.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

brew won't install sshpass. Is there a workaround?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.