Why are backslashes in the SSH ProxyCommand not being escaped when running the ansible command?

Solution Verified - Updated -

Issue

Ansible attempts to connect to a bastion server using a domain account with the following option set -o ProxyCommand="ssh -W %h:%p -q domain\\account@proxy" in the ansible_ssh_common_args variable. Upon connecting to bastion server, the backslashes are ignored so the username ends up being domainaccount instead of domain\account.

Environment

  • Ansible 2.9+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content