I've seen a lot of variants of this question but I don't think anything fits my exact situation.
I'm on a computer at work which is SSH'd into a server. While on this server I would like to SCP some files from my Mac at home.
I can SSH into my Mac from the server no problem with the normal command:
ssh [email protected]
However when I try to SCP I get: -bash: /usr/bin/scp: Permission denied
I am using the command:
scp [email protected]:/absolute/filepath/i* local/folder
I have also tried number -p flags. There is only one account on my mac and it is the administrative account. I'm not sure if there are permissions issues or if it is because I am SSH'd into the server or if it is something else.
I am also able to SCP successfully from the server to my Mac when doing so from my Mac at home.
Any suggestions?
Edit: Additional relevant information originally posted as comments because I had a brain fart about protocol. (my bad).
Specifically related to my last sentence about being able to 'reverse' SCP: the following command works when I am logged into my Mac as the local machine:
scp -P 22003 [email protected]:Data/path/i* /Full/Path/On/Mac/
Running ls -l /usr/bin/scp
on the server (local) returns the following:
rwxr-x---. 1 root root 67648 Aug 31 12:40 /usr/bin/scp
Running ls -l /usr/bin/scp
on the Mac (remote) returns the following:
-rwxr-xr-x 1 root wheel 81360 Dec 1 14:45 /usr/bin/scp
ls -l /usr/bin/scp
on the server?ls -l /usr/bin/scp
on both local and remote systems?work -ssh> server -scp> Mac
fails with above error, butMac -ssh> server -scp> Mac
succeeds ? That would be really "weird", either you can execute/usr/bin/scp
on server or you cannot, regardless of where youssh
in from ... ifMac -scp> server
works always,ssh
to your Mac and thenscp
back to server.