Win32-OpenSSH
Win32-OpenSSH copied to clipboard
ProxyCommand Token Replacement doesn't work with SCP.exe (OpenSSH V8.6.0.0 and later)
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
- Install the latest version of OpenSSH.
- Run scp like:
scp -v -o ProxyCommand="c:\foo\bar.exe %h %p" ... - 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
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.