|
@@ -1103,11 +1103,9 @@ class SubprocessSSHVendor(SSHVendor):
|
|
def run_command(self, host, command, username=None, port=None,
|
|
def run_command(self, host, command, username=None, port=None,
|
|
password=None, key_filename=None):
|
|
password=None, key_filename=None):
|
|
|
|
|
|
- if password:
|
|
|
|
|
|
+ if password is not None:
|
|
raise NotImplementedError(
|
|
raise NotImplementedError(
|
|
- "You can't set password or passphrase for ssh key "
|
|
|
|
- "with SubprocessSSHVendor, use ParamikoSSHVendor instead"
|
|
|
|
- )
|
|
|
|
|
|
+ "Setting password not supported by SubprocessSSHVendor.")
|
|
|
|
|
|
args = ['ssh', '-x']
|
|
args = ['ssh', '-x']
|
|
|
|
|
|
@@ -1131,21 +1129,16 @@ class SubprocessSSHVendor(SSHVendor):
|
|
|
|
|
|
class PLinkSSHVendor(SSHVendor):
|
|
class PLinkSSHVendor(SSHVendor):
|
|
"""SSH vendor that shells out to the local 'plink' command."""
|
|
"""SSH vendor that shells out to the local 'plink' command."""
|
|
|
|
+
|
|
def run_command(self, host, command, username=None, port=None,
|
|
def run_command(self, host, command, username=None, port=None,
|
|
password=None, key_filename=None):
|
|
password=None, key_filename=None):
|
|
|
|
|
|
- if password and key_filename:
|
|
|
|
- raise NotImplementedError(
|
|
|
|
- "You can't set passphrase for ssh key "
|
|
|
|
- "with PLinkSSHVendor, use ParamikoSSHVendor instead"
|
|
|
|
- )
|
|
|
|
-
|
|
|
|
if sys.platform == 'win32':
|
|
if sys.platform == 'win32':
|
|
args = ['plink.exe', '-ssh']
|
|
args = ['plink.exe', '-ssh']
|
|
else:
|
|
else:
|
|
args = ['plink', '-ssh']
|
|
args = ['plink', '-ssh']
|
|
|
|
|
|
- if password:
|
|
|
|
|
|
+ if password is not None:
|
|
import warnings
|
|
import warnings
|
|
warnings.warn(
|
|
warnings.warn(
|
|
"Invoking PLink with a password exposes the password in the "
|
|
"Invoking PLink with a password exposes the password in the "
|