I can scp just fine from local to remote by doing:

scp trip3.csv [email protected]:/home/pi/

But when I try to do remote to local (below) it says no such file or directory:

scp [email protected]:/home/pi/trip3.csv /Users/andrew/Desktop

When i try scp [email protected]:/home/pi/image.jpg ~ it asks for my remote password and shows that the transfer went through, but i can't find the file on my local machine.

also, when i go from remote to local, why does it ask me for my remote password. shouldn't it ask me for my local password?

Any thoughts?

How I figured out my issue:

I was initially trying to use scp while ssh'd into the raspbery pi, from the raspberry pi command line. I did not realize you could only scp from your local machine.

My issue was solved when I scp'd from my local machine.

1 Answer 1


I take it you’re using a Mac and copying to/from a Raspberry Pi, is that correct? (Not that it matters particularly, it’s just so my explanations are clearer.)

Regardless of the “direction” of the copy, scp always asks for the remote password. You’re running commands on your Mac, so you’ve already proved that you know how to access the local end (the Mac); you need to prove that you know how to access the remote (the Raspberry Pi), so scp asks for the remote password.

If copying from a remote computer to the local computer asked for your local password, you could copy any file from anywhere using only your local password... Imagine if

scp `[email protected]:/home/larry/Financials.pdf` ~

copied that file to your computer, asking only for your password :-).

To understand the errors you’re getting, a couple of commands will help. What do

ssh [email protected] ls -l /home/pi/trip3.csv


ls -ld /Users/andrew/Desktop

say? The first checks whether trip3.csv really exists on the Raspberry Pi (which it should, given that your first command succeeded), and the second checks whether /Users/andrew/Desktop really exists on the Mac.

ls -l ~/image.jpg

should indicate where image.jpg ended up.


You must log in to answer this question.

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