I'm trying to copy a file to my local machine. While in the terminal of the remote server:
scp root@servername:filename.json ~/Desktop/
/root/Desktop/: No such file or directory
So then I tried:
scp root@servername:filename.json ~/
Permission denied (publickey).
ssh: connect to host 02 port 22: Invalid argument
Any idea what I can do to make this work? I am logged in as root user.