diff --git a/salt/client/ssh/shell.py b/salt/client/ssh/shell.py index 674e9f075191..9695ff63c087 100644 --- a/salt/client/ssh/shell.py +++ b/salt/client/ssh/shell.py @@ -257,7 +257,9 @@ def _cmd_str(self, cmd, ssh=SSH_PATH): # need to deliver the SHIM to the remote host and execute it there command = [ssh] - if ssh != SCP_PATH: + if ssh == SCP_PATH: + command.append("-p") + else: command.append(self.host) if self.tty and ssh == SSH_PATH: command.append("-t -t")