-E option for reading password from named env-var
Brought to you by:
thesun
Sorry if this is the wrong way to do it, but this is my first attempt at contributing with sourceforge, svn, or C (or indeed roff)!
This patch adds a -E envvar
option, which allows the user to specify the name of the environment variable the password should be read from. This is helpful for cases where sshpass needs to be called for multiple targets within the same environment, for example when SSHing with a proxyjump. -f filename
allows us to read from an arbitrary file; the same reasoning could be applied to environment variables.
Same file, more useful name.
I am less opposed to this patch than the others, but there is relevant discussion in the mailing list.
https://sourceforge.net/p/sshpass/mailman/message/37318911/
I went another route. The
-e
option now has an optional argument specifying the environment environment. Code is committed.