diff --git a/lib/ansible/plugins/connection/paramiko_ssh.py b/lib/ansible/plugins/connection/paramiko_ssh.py index 5e98665ef7..01ecd25523 100644 --- a/lib/ansible/plugins/connection/paramiko_ssh.py +++ b/lib/ansible/plugins/connection/paramiko_ssh.py @@ -291,7 +291,7 @@ class Connection(ConnectionBase): chunk = chan.recv(bufsize) display.debug("chunk is: %s" % chunk) if not chunk: - if 'unknown user' in become_output: + if b'unknown user' in become_output: raise AnsibleError( 'user %s does not exist' % self._play_context.become_user) else: break