scp -i ~/.ssh/my_id_rsa -P 30000 some_file.gz sshuser@1.2.3.4:/home/sshuser/
And it returned:
scp:/some_file.gz: Permission denied
The rsa key file is the same file I use to connect via SSH (along with the port # and username and i.p)
Does anything stand out that could be causing the permission issue?
UPDATE
I have iptables running, do I need another entry for scp or does it use ssh protocol? (silly question but just making sure here!)
I'm not getting a 'connection refused' error so not sure if this is the issue.
cp some_file.gz /dev/nullunder the same conditions that thescpis failing? – Dennis Williamson Nov 27 '10 at 7:10scpwith--verboseoption and post the result somewhere (e.g. on pastebin)? – whitequark Nov 27 '10 at 7:11/some_file.gzin the error message of yourscpcall looks like you're trying to copy the file to the root directory (/) of the remote server. Is/home/sshuser/filled in by a variable or do you literally provide that directory as a target? – joschi Nov 27 '10 at 7:56