It is simply amazing to me why people love to build complicated, buggy, difficult to mantain, insecure solutions to problems which can be solved with simple, easy to maintain, more secure solutions.
Why?
- Job security?
- Having fun learning on the job getting paid by others?
I can assure you that if these guys were the owners of this IT and they were not getting paid to implement these overtly complex, buggy, hard to maintain, insecure solutions they would NOT do it.
Honestly, I keep seeing this more and more, especially from "certain countries" where the guys just seem to want to implement these overly complex, buggy, hard to maintain, and less secure solutions when, if they would just listen to us (people with many, many decades of coding and day to day sys admin experience, who likes simple, secure, easy to maintain, not buggy solutions), then their IT life would be a lot easier (and the questions here would be more practical).
I repeat....
Do not user sshpass. Use shared public-keys without passwords. It is more secure, less complex, easier to maintain and less buggy. I know. I do this every day on real systems!
Keep it simple!