-
Notifications
You must be signed in to change notification settings - Fork 779
[Regression] v7.7.0.0 - SCP fails when using bash as alternative shell #1165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Added utility to build session process command line - this accounts for restrictions from various shells. With these changes, scp and sftp-server are expected to be machine wide PATH if a custom shell (other than cmd.exe) is defined. Added comprehensive test cases. Fixed issue with USERNAME env variable containing domain prefix too. PowerShell/Win32-OpenSSH#1165 PowerShell/Win32-OpenSSH#1165 PowerShell/Win32-OpenSSH#1171
@manojampalam Just compiled and tested the latest commit. Bash is now failing commands passed to it.
Debug message:
Command to successfully execute should be
Also affects SCP.
|
Powershell bash is not affected, only appears to be vanilla bash such as with Git for Windows and Cygwin. |
Fun experiment, won't work in the long term but double-quoting single-quote command passes and executes.
|
@manojampalam I know this is highly irregular, but here is the fix I propose. However, I cannot contribute myself. I suggest adding a generic bash "SH_GEN_BASH" to the enum for command building, or else having "SH_OTHER" get decorated like WSL bash or Cygwin bash. The following code fixes my issue, and even allows Jenkins to successfully connect an SSH slave. Starts at line 1724 and ends at 1899.
|
Thanks @hugginsa I've create one more PR, to apply same rules to all possible bash shells. Can you try it out? |
Testing now, but looking at the code I believe this solves my issue. Will request that it re-open if this does not give the expected behavior with bash. |
If it is a terminal issue then please go through wiki
https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH
"OpenSSH for Windows" version
7.7.0.0
Server OperatingSystem
Windows 10 Pro
Client OperatingSystem
Windows 8 Pro
What is failing
When server uses either Cygwin bash or Git for Windows bash as the alternative shell, scp does not execute. Message in log when debugging is:
Previous version 7.6.1.0 did not have this issue and successfully copies.
Expected output
A successful copy operation
Actual output
The text was updated successfully, but these errors were encountered: