From 70d89b54876360b1ece8346b1ceaa8af5478e9c0 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 24 Apr 2018 14:11:08 -0400 Subject: [PATCH] use actual ssh executable as it might not be ssh --- lib/ansible/plugins/connection/ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index d4e9c5cfd7c..57494a9d0dd 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -677,7 +677,7 @@ class Connection(ConnectionBase): # only when using ssh. Otherwise we can send initial data straightaway. state = states.index('ready_to_send') - if b'ssh' in cmd and sudoable: + if to_bytes(self.get_option('ssh_executable')) in cmd and sudoable: if self._play_context.prompt: # We're requesting escalation with a password, so we have to # wait for a password prompt.