Trying to transfer a file from my raspberryPi to my laptop (in the same network) via the terminal, but it takes a while and then says

ssh: connect to host port 22: Connection timed out lost connection

The command in the terminal reads:

$ scp examplefile.txt [email protected]:C:\Users\bruno\Documents

When I enter $ ping I get PING ( 56(84) bytes of data. and the transfer in the other direction:

scp C:\Users\Documents\examplefile.txt openhabian@openhabianpi:home

works fine. Whats the issue?

1 Answer 1


I'm guessing your laptop is running Windows 10. For the command you mentioned not working, you need to setup an SSH server on the laptop.

Point is, scp relies on remote SSH server to copy files to and from the remote host. As in your case, I'm assuming the Raspberry Pi has an SSH server running on it, so you can always copy files to and from it with scp on another machine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .