I am trying to copy a file over from my machine to my personal space on a university server. On my machine, the file is located at /home/karnivaurus/file.pdf.
If I connect to the server with ssh [email protected], and then run pwd, it prints /homes/karnivaurus. If I run ls, it just displays one directory, foo. What I want to do then, is to copy this file over to the directory /homes/karnivaurus/foo.
So, after exiting the ssh, I enter the local home directory /home/karnivaurus. I then run the command cp paper.pdf [email protected]/foo/paper.pdf, but this returns the error message cp: failed to access ‘[email protected]/homes/karnivaurus/paper.pdf’: Not a directory. I have also tried running cp paper.pdf [email protected]/homes/karnivaurus/foo/paper.pdf, but this gives me the same error message.
What am I doing wrong?
scp paper.pdf [email protected]/foo/cpis a local copy operation.scpis for performing acpoverssh. – user4556274 Aug 05 '16 at 14:35:in the command. It would bescp paper.pdf [email protected]:/foo/– Terrance Aug 05 '16 at 14:39