[Bug 3751] New: ssh fails to parse ProxyCommand option with a string that ends in a backslash

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Tue Nov 12 22:02:37 AEDT 2024


https://bugzilla.mindrot.org/show_bug.cgi?id=3751

            Bug ID: 3751
           Summary: ssh fails to parse ProxyCommand option with a string
                    that ends in a backslash
           Product: Portable OpenSSH
           Version: 8.7p1
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: kaltsi+bug at gmail.com

This worked still in 8.6p1, but returns a failure in 8.7p1 and newer.

openssh-8.7p1$ ./ssh -o ProxyCommand="echo 'foo\\'"
command-line line 0: invalid quotes

If I rearrange the quotes, there is no failure:

openssh-8.7p1$ ./ssh -o ProxyCommand='echo "foo\\"'
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
...

If the inner string isn't quoted, no failure:

openssh-8.7p1$ ./ssh -o ProxyCommand="echo foo\\"
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
...

My use case is using 'sshpass' as a ProxyCommand and give it the
password option with a password that ends in a backslash.

ssh -o ProxyCommand="sshpass -p 'password\\' ssh -o
StrictHostKeyChecking=no -W %h:%p -p 22 -l testuser jumphost.invalid"
targethost.invalid

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list