With pscp in windows command line, i can send file from Windows to Pi or i can copy a file from Pi to Windows. But opposite does not work. I cant send a file from pi to windows with pi's terminal.

scp text.txt username@

or C/Users/Desktep with out colon. Both does not work. It returns nothing. After few minutes it says connection timed out.

  • 1
    first thing I notice is that is not the path to the desktop in windows it is c:/users/username/Desktop. You also need to have an SSH server running on the windows side. Dec 24 '15 at 18:30
  • yes i noticed that windows does not support ssh natively. So i will try os.execute in Lua script with pscp. Thank you
    – Reactionic
    Dec 24 '15 at 18:34
  • I think Cygwin has a sshd daemon that might be of use for this. I was aware that my old PC had some cygwin deamons running and I thought one of them was a sshd one though now I am not so sure - I found this article which seems quite informative at least as up to Windows 7 but I won't post it as an answer as I do not know if it is still accurate for later versions.
    – SlySven
    Dec 24 '15 at 19:35
  • @Israr Ali - Hi there and welcome to SE. I notice that around various Stack Exchange sites that you have been suggesting edits that add simply "Waiting for your response. Thanks." Please don't do that. You should edit questions that have serious formatting issues, or a series of typos, mistakes, etc. Not to simply add thanks, as it adds nothing to the question, whatsoever... In fact, "Hi", "Thanks", Regards" and signatures are usually edited out of questions, in order to keep the post short. Thank you for your understanding. Apr 22 '19 at 11:06

When you run scp/pscp/ssh/... on windows, you are connecting to the ssh server running on the pi.

To do the opposite, to run these commands on the pi to connect to windows, an ssh server must be running on the windows machine.

It seems that's what you're missing. You need to install an ssh server on the windows machine. This might not be trivial, but certainly doable.

  • thak you i solved problem with calling files from winodws
    – Reactionic
    Dec 29 '15 at 15:00

For a smooth and powerful two way SSH conversation with your PI (or any other Linux box), use WinSCP
The interface is very intuitive; will even read your saved PuTTY hosts as default host destinations.
Both are the best weapons on your toolbox.

  • thak you i solved problem with calling files from winodws
    – Reactionic
    Dec 29 '15 at 15:00

You might use from Windows cmd: scp pi@'rpi's ip address':text.txt text.txt

In this case you don't need an SSH server on Windows, because you use the Raspberry Pi's SSH server and actually send a receive command.

Example on my computer: Windows cmd: scp pi@ rpi_testfile.txt Then I have rpi_testfile.txt on my computer.

  • This doesn't answer the question.
    – RalfFriedl
    Apr 21 '19 at 15:30
  • It does.I put an example how to send data from rpi to Windows PC.
    – David Imre
    Apr 23 '19 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.