I have logged in using ssh and now want to copy several directories off the server to my local machine.

I attempted with “cp :” am I on the right track?

2 Responses to “How do I copy files from a linux server to my local machine w command line?”

  • Harold L:

    Yes, you’re on the right track. “scp” is a combination of “ssh” and “cp”. On your local machine, you can say

    scp :

    to grab the file from the Linux server (or any other machine with an ssh server running).

    Oops – here is more info:

    You said you want to copy several directories. To copy an entire directory with scp, you can use the “-r” flag like this:

    scp -r :

    That will copy the directory and all files and subdirectories under it to your local system.

  • Bill M:

    scp is one way, or (if you are root on the linux server) you can set up a samba server and share files like you would share them on Windows machines.

Leave a Reply