10 SCP Commands to Transfer Files/Folders in Linux

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Pungki Arianto

Currently I am a Linux/Unix administrator. But I also play Windows both in server and desktop area. Interested in information technology, information security and writing.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

51 Responses

  1. Ramsheed M P says:

    Thank you!very helpful

  2. Aka says:

    While copying files from server to client using scp from server system RAM decreasing constantly how to limit it? Size of the file 90gb RAM 15gb in server machine..

  3. Fasih Uddin says:

    I used the below scp command to transfer files, but I don’t find the destination location where all the files copied successfully. I didn’t mention the destination location and put a dot in the end. Please help me to locate the files copied.

    # scp sourcefile/*.fmb [email protected]:.
  4. Sam Smith says:

    Thanks for this very useful post. I see nowadays many universities are encouraging students to use SFTP and SSH instead of FTP, which I think is a good practice. I’m curious what you think about Web RTC and if you think it will be widely implement by individuals and companies.

    Sam Smith

  5. Adam Haworth says:

    Why do files often get missed when doing a transfer? We have a 400mb on server A and when finished transferring the folder size is 130mb on server B?

    • Ravi Saive says:


      No that’s not possible, it should be same size on server B, may be you’re doing some mistake while transferring data from server A, please check carefully and do a transfer over scp..

    • subhan subhan says:

      Probably you did SCP recursively, that is copy all files and folders inside a folder being copied.

      Use SCP -r commnad, see “Copy files inside directory recursively section above”

  6. Dan Putra says:

    I love it when looking around for linux tutorial and found a good one written by old friend. Hi Pungki!

  7. Prasad says:

    It is useful article. But you may mention how to copy local to remote, remote to local, remote to remote and all. Anyway it’s good.

  8. Satya says:

    Nice Article. After reading entire article- Very impressive.. Most of the time I was used general scp -pr, now I understand the importance of this scp command with detailed info. New thing is learned scp -C… Good to hear all and very good article.(DBA)

  9. Naagabaabu says:

    Nice article. Covers more useful SCP options in a detailed manner….. Helps me alot to learn about SCP command. thank you for your information..

  10. Johns says:

    Great article. I had an issue with a password-less login via ssh and rsync. There was a Linux ftp server that had a mounted CIFS (Win2003) share on the back end. For the life of me I couldn’t get rsync to copy. So…my wild guess was the CIFS mount was under a windows security contact where as rsync had no access to.
    I tried scp and now I can copy file (flawless).
    Just my two cents. Again great article!

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.