Copy a file from server to local hard disk
macos, scp, ssh, unix
Solution
first, don't ssh into the remote server. then, I find this to be a very good resource for scp syntax: Example syntax for Secure Copy (scp)
the one your looking for is this: to copy the file "foobar.txt" from a remote host to the local host
$ scp your_username@remotehost.edu:foobar.txt /some/local/directory
if you're still having issues, please post the exact command you're using
Problem
I'm trying to copy a database dump sql file from my server to my hdd using mac OSX Terminal (open ssh client). I know the command should be something like: ``` scp [[user]@host]:mydump.sql mydump_local.sql ``` But I found out that it did `copy` that file on the same server instead of my hdd (i.e. using `ls *`, I found both files mydump.sql and mydump_local.sql) What am I doing wrong?