vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

[Remote-SSH Bug]: cygwin scp commandline error

Open cmeriaux opened this issue 1 year ago • 0 comments

Is there an existing issue for this bug?

  • [X] I have searched the existing issues

Required Troubleshooting Steps

  • [X] I have followed these troubleshooting steps
  • [X] I have tried both values of the remote.SSH.useLocalServer setting

Connect Locally

It doesn’t connect successfully (same error message)

->

No response

Expected Behavior

Uploading a tarball should work

Steps To Reproduce

  1. Use Windows host, with cygwin openssh
  2. connect to a linux remote plateform

Remote-SSH Log

Remote-SSH Log

09:29:08.333] Downloading VS Code server locally...
[09:29:08.470] Downloaded VS Code server to c:\Users\CHRIST~1.MER\AppData\Local\Temp\0c521cb6-855e-45fb-9568-c45cf0a2b153
[09:29:08.472] Renamed VS Code server to c:\Users\CHRIST~1.MER\AppData\Local\Temp\vscode_server_1718954948470\vscode-cli-611f9bfce64f25108829dd295f54a6894e87339d.tar.gz
[09:29:08.476] Checking ssh with "C:\tools\cygwin\bin\ssh.exe -V"
[09:29:08.666] > OpenSSH_9.7p1, OpenSSL 3.0.13 30 Jan 2024

[09:29:08.672] Expecting scp to be next to ssh at C:\tools\cygwin\bin\scp.exe
[09:29:08.673] Testing scp with "C:\tools\cygwin\bin\scp.exe"
[09:29:08.815] scp exited with code: 1
[09:29:08.815] Got stderr from scp: usage: scp [-346ABCOpqRrsTv] [-c cipher] [-D sftp_server_path] [-F ssh_config]
           [-i identity_file] [-J destination] [-l limit] [-o ssh_option]
           [-P port] [-S program] [-X sftp_option] source ... target
[09:29:08.816] Using SSH config file "C:\tools\cygwin\home\christophe.meriaux\.ssh\config"
[09:29:08.816] Copying file to remote with "C:\tools\cygwin\bin\scp.exe" -F "C:\tools\cygwin\home\christophe.meriaux\.ssh\config" "c:\Users\CHRIST~1.MER\AppData\Local\Temp\vscode_server_1718954948470\vscode-cli-611f9bfce64f25108829dd295f54a6894e87339d.tar.gz" "vscode-cli-611f9bfce64f25108829dd295f54a6894e87339d.tar.gz.done" emulation:"/home/cmeriaux/.vscode-server"
[09:29:08.816] Using cwd: file:///c%3A/Users/CHRIST~1.MER/AppData/Local/Temp/vscode_server_1718954948470
[09:29:08.816] Terminal shell path: C:\Windows\System32\cmd.exe
[09:29:14.984] > ssh: Could not resolve hostname c: Name or service not known
> ]0;C:\Windows\System32\cmd.exe
[09:29:15.000] > /usr/bin/scp: Connection closed
[09:29:16.465] "Copy server to host" terminal command done
[09:33:08.073] > 
> ```

</p>
</details>


### Anything else?

scp cygwin version does not understand the command line. It seems that SCP doesn't understand the path "c:\Users\CHRIST~1.MER\AppData\Local\Temp\vscode_server_1718954948470\vscode-cli-611f9bfce64f25108829dd295f54a6894e87339d.tar.gz".
It seems that scp only support path with /cygdrive/c......

A solution could be: move to the current directory of the file, then use local path vscode-cli-611f9bfce64f25108829dd295f54a6894e87339d.tar.gz

What do you think about that
Thanks

cmeriaux avatar Jun 21 '24 08:06 cmeriaux