Win32-OpenSSH icon indicating copy to clipboard operation
Win32-OpenSSH copied to clipboard

ProxyCommand Token Replacement doesn't work with SCP.exe (OpenSSH V8.6.0.0 and later)

Open seanyen opened this issue 3 years ago • 1 comments
trafficstars

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest version
  • [X] Search the existing issues.

Steps to reproduce

  1. Install the latest version of OpenSSH.
  2. Run scp like: scp -v -o ProxyCommand="c:\foo\bar.exe %h %p" ...
  3. Check the scp verbose logs to see how it is going to execute the ProxyCommand.

Expected behavior

Expect the `%h` and `%p` to be replaced with the hostname and port respectively.

Actual behavior

They are replaced by some random content strings.

This seems to be a regression. The ProxyCommand works fine in V8.1.0.0.

BTW, just some observation, if I am doing the random % tokens like scp -o ProxyCommand="C:\foo\bar.exe %s %d %c" ...

Then the SCP will compose something similar to what `printf` behaves. (For example, "C:\foo\bar.exe (null) -1883202610 \357\277\275".)

It could be a clue what's wrong there.

Error details

No response

Environment data

None

Version

V8.9.1.0, V8.9.0.0, V8.6.0.0

Visuals

No response

seanyen avatar Aug 25 '22 22:08 seanyen

Thanks for raising this issue! Just a note - I think the affected versions are V8.9.1.0 & V8.9.0.0. I am not able to repro with V8.6.0.0.

tgauth avatar Aug 29 '22 20:08 tgauth