0

We have OpenSsh installed and running on remote windows server. When I connect to it through Remote Desktop and run scp on command prompt it gives all the available options for scp commnad.

but when I am trying to scp from my linux machine to it like scp myuser@windows-machine:test.txt . it's giving me the below error

'scp.exe' is not recognized as an internal or external command,
operable program or batch file.

I can do ssh using the same user credential and after doing ssh if i run the scp there still it gives the same error.

Can anybody please help if I am missing some configuration on remote windows machine ?

Thanks,

Manish
  • 111

1 Answers1

0

Your question does not seem consistent. You say you run
ReEditted thanks to Kamil's comment

homedir@linuxhost$ scp myuser@windows-machine:test.txt .

Yet your error message is literally generated by a windows shell.
That doesn't seem right, unless...... You are running PowerShell as your shell on your linux system

On my windows system with OpenSSH-server installed there are 2 instances of scp.exe:

homedir@linuxhost ssh myuser@windows-machine where scp
C:\Windows\System32\OpenSSH\scp.exe
C:\Program Files\OpenSSH-Win64\scp.exe

Strangely the actual executable used by sshd is the one in "Program Files". Perhaps (re)installing the OpenSSH-client feature will fix your problem.

aribi
  • 121