| 2022-06-01

How to Use SCP to Copy Files to a Remote Server

    SCP is a shell command used to copy files to, or from, a remote server via the command line interface. It is based on the ssh protocol. You’ll need the username and ip address of the remote server, and the password for that user at the remote server. At the command line prompt, type the following command, substituting “file” with the path to the file that you want to copy. After a space, type the username and ip address of the remote server and the path to the remote directory that you want to copy into.

    Secure Copy

    scp file username@ipaddress:/remote/dir
    
    bash

    After you press enter you should be prompted to enter the password. Note that in most terminals the password will not register any feedback or move the cursor, it will remain blank. Just press enter.

    Example

    scp /home/text_files/001_content.txt billy@192.185.00.222:/home/billy/public_html/textfiles
    
    bash

    Thanks for reading. If you enjoyed this post, I invite you to explore more of my site. I write about web development, programming, and other fun stuff.