I just discovered sshpass and saw some comments of people complaining that there's no good use case that justifies it. Well, I have a use case. That's in fact what made me search about the theme and found it. I created a user on a machine and I can't remember which password I used, but I know it's probably one of a small list I can think of. The list is composed of variations of the same string, in a way that I could generate with a program. It would take me time to try all the passwords by hand, so using sshpass make things much easier:

$ generate-password > pass-list
$ for i in `cat pass-list`; do sshpass -p $i ssh host; done
Weak.
Comment by Anonymous Qui 28 Out 2010 19:24:00 UTC
If you're going to do this kind of thing, at least don't put the password on the command line. Read it from a file or an FD instead.
Comment by Anonymous Qui 28 Out 2010 20:24:24 UTC
There's nothing wrong with passing passwords in the command line if you're the only user of a machine or if you trust the other users.
Comment by Anonymous Ter 02 Nov 2010 15:48:12 UTC