mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-22 12:47:54 +00:00
Fixed bug #62924: Allow sshpass password in $SSHPASS.
This commit is contained in:
parent
bbb94ab9e4
commit
0da05fe981
|
@ -6895,6 +6895,7 @@ sub new($$) {
|
|||
# user[:pass]
|
||||
if($userpw =~ s/:(.*)//) {
|
||||
$password = $1;
|
||||
if($password eq "") { $password = $ENV{'SSHPASS'} }
|
||||
if(not ::which("sshpass")) {
|
||||
::error("--sshlogin with password requires sshpass installed");
|
||||
::wait_and_exit(255);
|
||||
|
|
|
@ -30,6 +30,8 @@ par_sshpass_with_password() {
|
|||
echo '### sshpass'
|
||||
echo OK | parallel -S "sshpass -p $withpassword ssh withpassword@lo:22" echo
|
||||
echo OK | parallel -S withpassword:"$withpassword"@lo:22 echo
|
||||
export SSHPASS="$withpassword"
|
||||
echo OK | parallel -S withpassword:@lo:22 echo
|
||||
}
|
||||
|
||||
par_ssh_ssh() {
|
||||
|
|
|
@ -100,6 +100,7 @@ par_sshlogin_with_comma OK
|
|||
par_sshpass_with_password ### sshpass
|
||||
par_sshpass_with_password OK
|
||||
par_sshpass_with_password OK
|
||||
par_sshpass_with_password OK
|
||||
par_stop_if_no_hosts_left ### Stop if all hosts are filtered and there are no hosts left to run on
|
||||
par_stop_if_no_hosts_left parallel: Warning: Removed no-such.host.
|
||||
par_stop_if_no_hosts_left parallel: Error: Cannot run any jobs.
|
||||
|
|
Loading…
Reference in a new issue