PowerShell / PowerShell/Win32-OpenSSH
SCP Single File - protocol error: filename does not match request
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
Troubleshooting steps
https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps
Terminal issue? please go through wiki
https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH
Please answer the following
"OpenSSH for Windows" version
((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)
8.0.0.0
Server OperatingSystem
((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion\" -Name ProductName).ProductName)
Windows Server 2012 R2 Standard
Client OperatingSystem
Ubuntu 18.04 Bionic
dpkg -l | grep ssh
ii libssh2-1:amd64 1.8.0-1 amd64 SSH2 client-side library
ii libssh2-1-dev:amd64 1.8.0-1 amd64 SSH2 client-side library (development headers)
ii openssh-client 1:7.6p1-4ubuntu0.3 amd64 secure shell (SSH) client, for secure access to remote machines
ii openssh-server 1:7.6p1-4ubuntu0.3 amd64 secure shell (SSH) server, for secure access from remote machines
ii openssh-sftp-server 1:7.6p1-4ubuntu0.3 amd64 secure shell (SSH) sftp server module, for SFTP access from remote machines
ii php-ssh2 1.1.2+0.13-1build1 amd64 Bindings for the libssh2 library
ii ssh-import-id 5.7-0ubuntu1.1 all securely retrieve an SSH public key and install it locally
ii sshpass 1.06-1 amd64 Non-interactive ssh password authentication
What is failing
I'm trying to SCP a file which contains a space:
scp -o BatchMode=yes -o ConnectTimeout=3 -o StrictHostKeyChecking=no administrator@10.0.0.10:'"C:/ProgramData/AA Care/Enterprise Archive 4.0/Error_20180226.log"' /tmp/check_logfiles_remote.17955
Expected output
File is copied
Actual output
protocol error: filename does not match request
I've tried various combinations of quotes and backslashes, this is the closest I've managed to get but I'm now getting a protocol error
I'm connecting using a key, SSH is set to use PowerShell
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the SCP command against the Windows Server 2012 R2 host, using the quoted path with spaces and PowerShell as the SSH shell. Start by tracing SCP filename handling on the Windows server and compare the requested path with the filename returned to the Ubuntu client. Done means the file copies successfully without a protocol error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100