Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to know about two ways: scp and rsync and how exactly they are used to copy files.

I tried doing

scp ubuntu@ip-10-124-83-21:/home/* /home/ubuntu/

but it didn't work. Using rsync, I get

rsync: mkstemp "/home/" failed: Permission denied (13) is on my remote machine and I need to pull it down in home folder. I am using Cygwin under Windows, and it would be awesome if someone could tell me how to use these commands correctly.

share|improve this question
On using rsync, I get rsync: mkstemp "/home/" failed: Permission denied (13) – user24454 Jul 21 '13 at 7:01
Looks like you may have the paths on the remote and local machine messed up. Is ip-10-124-83-21 the remote machine, ubuntu the username there? Also, what is the path to that file on the remote machine? – lupincho Jul 21 '13 at 7:09
Are you sure /home/ubuntu exists on your machine? – slhck Jul 21 '13 at 8:56

To copy a file from a remote machine to the local one the commands are:

scp <remote-user>@<remote-machine>:<remote-path-to-file> <local-destination>


rsync <remote-user>@<remote-machine>:<remote-path-to-file> <local-destination>

Though I'd use scp for that. I can't tell what's what in your example, so that's as specific as I can get.

You can also always check the man pages with:

man scp
share|improve this answer

scp -i <path-to-public-key> <remote-user@remote machine>:<remote-path-to-file> <local-destination>

For example

scp -i Downloads/xyz.pem Desktop/

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .