bolkedebruin closed pull request #2416: try to enable password for sshpass
URL: https://github.com/apache/incubator-airflow/pull/2416
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/airflow/contrib/hooks/ssh_hook.py
b/airflow/contrib/hooks/ssh_hook.py
index e63a65d174..fc0cf5f324 100755
--- a/airflow/contrib/hooks/ssh_hook.py
+++ b/airflow/contrib/hooks/ssh_hook.py
@@ -72,8 +72,8 @@ def _host_ref(self):
def _prepare_command(self, cmd):
connection_cmd = ["ssh", self._host_ref(), "-o", "ControlMaster=no"]
- if self.sshpass:
- connection_cmd = ["sshpass", "-e"] + connection_cmd
+ if self.conn.password:
+ connection_cmd = ["sshpass", "-p", self.conn.password] +
connection_cmd
else:
connection_cmd += ["-o", "BatchMode=yes"] # no password prompts
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services