Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I'm SSH-ing into a server and trying to download a file to my local machine using scp:

scp user@remotehost:/path/to/file/filename .

But the file ends up downloading in the home directory on the server! What am I doing wrong?

share|improve this question
up vote 2 down vote accepted

You're running that command on the remote server? You're copying that file to the directory where you ran that command ("." - on the same server)

You can either run the same command on your local machine, or run:

scp /path/file user@yourlocalmachine:/home/yourlocaluser/

on the server.

share|improve this answer
* facepalm * Thank you, sir. – Abid A Oct 4 '12 at 1:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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