Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.