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?
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:
on the server.