System Administration Guide: Security Services

How to Copy Files With Secure Shell

Use the scp command to copy encrypted files between hosts. You can copy encrypted files between either a local and remote host, or between two remote hosts. The command operates similarly to the rcp command except that it prompts for passwords. See scp(1) for more information.

  1. Start the secure copy program.

    Specify the source file, user name at remote destination, and destination directory.


    myLocalHost% scp myfile.1 johndoe@myRemoteHost:~
    
  2. Type the Secure Shell passphrase when prompted.


    Enter passphrase for key '/home/johndoe/.ssh/id_rsa': <Return>
    myfile.1       25% |*******                      |    640 KB  0:20 ETA 
    myfile.1 

    After you type the passphrase, the progress meter is displayed. See the second line in the preceeding output. The progress meter displays:

    • the file name

    • the percentage of the file that has been transferred at this point

    • a series of asterisks that are analogous to the percentage transferred

    • the quantity of data transferred

    • the estimated time of arrival (ETA) of the complete file (that is, the remaining amount of time)