Bookmark this page

Guided Exercise: Copying Files Over the Network With scp

In this lab, students will copy files from a remote system to a local directory by using scp.

Outcomes

Students will copy files from a remote host to a directory on the local machine.

  • Remotely copy the /etc/ssh directory on the serverX machine to the newly created directory /home/student/serverbackup on desktopX by using scp.

    1. Create the target directory /home/student/serverbackup on desktopX.

      [student@desktopX ~]$ mkdir /home/student/serverbackup
    2. Recursively copy the directory /etc/ssh from serverX to the /home/student/serverbackup directory on desktopX with the scp command. Note that only the root user can read all the content in the /etc/ssh directory.

      [student@desktopX ~]$ scp -r root@serverX:/etc/ssh /home/student/serverbackup
Revision: rh124-7-1b00421