It's driving me nuts! I just want to transfer one simple file from laptop to server.
I'm using ubuntu on both machines.
So I have:
-rwxr-xr-x 1 sandro 414622 2011-10-14 23:42 sandrophoto-html.tar.gz
And I'm sending it using:
sudo scp -P XXXX sandrophoto-html.tar.gz usern@server.local:/media/xx/xx/xx
And I get: scp: /media/xx/xx/xx/sandrophoto-html.tar.gz: Permission denied
p.s. I might be doing this other way around - I want to send file tar.gz that is located on my desktop, to remote server into the folder /media/yadayda
scp -i /Users/myusername/.ssh/sshuser ~/file.txt scpuser@33.122.133.444:~/
. In my case it was a lack of path to my private key. – neoswf Oct 30 '23 at 21:43