How to copy files from remote machine (ubuntu) to local machine (windows)?

14,734

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>

Or

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:
14,734

Related videos on Youtube

user24454
Author by

user24454

Updated on September 18, 2022

Comments

  • user24454
    user24454 over 1 year

    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/crockonjs-2-hd.mov
    

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

    rsync: mkstemp "/home/.crockonjs-2-hd.mov.V1x5F8" failed: Permission denied (13)
    

    crockonjs-2-hd.mov 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.

    • lupincho
      lupincho almost 11 years
      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?
    • slhck
      slhck almost 11 years
      Are you sure /home/ubuntu exists on your machine?