0

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?

Abid A
  • 103
  • 2

1 Answers1

2

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.

mulaz
  • 10,682
  • 1
  • 31
  • 37