Exercise: Copy a File To Remote Machine, And Verify

  • View your local password database’s metadata, and compute its SHA256 fingerprint.

    $ ls -l /etc/passwd
    -rw-r--r--. 1 root root 2746 Mar  3 14:12 /etc/passwd
    $ sha256sum /etc/passwd
    72c18232434d0551af75f964ea66ae5d9271faba895f40a929fb17f19d7ab44c  /etc/passwd
    
  • Use the scp command to copy that file to the remote machine - into your remote home directory under the name ~/my-local-passwd

  • Use the ssh command non-interactively to verify the SHA256 checksum on the remote side:

    • You do not login to the remote machine

    • You do not type the sha256sum command an a remote login shell

    • Rather, you use the local ssh command to automate that process and call sha256sum remotely for you.

  • Compare the remote fingerprint with the local fingerprint

  • Did the copy succeed without information loss?

cluster_linux Linux cluster_linux_basics Linux Basics cluster_linux_basics_intro Introduction: Concepts and Terminology cluster_linux_ssh SSH: Secure Shell cluster_linux_ssh_exercises Exercises: SSH linux_basics_intro_login Login? What Is That? linux_basics_intro_process_tree Process Hierarchy (Parent, Child Process) linux_basics_intro_login->linux_basics_intro_process_tree linux_basics_intro_process Processes, Scheduling, Address Spaces linux_basics_intro_overview Overview linux_basics_intro_process->linux_basics_intro_overview linux_basics_intro_process_tree->linux_basics_intro_process linux_ssh_scp SSH: Secure Copy (scp) linux_ssh_basics SSH: Basics linux_ssh_scp->linux_ssh_basics linux_ssh_key_pair SSH: Public Key Authentication linux_ssh_key_pair->linux_basics_intro_login linux_ssh_key_pair->linux_ssh_basics linux_ssh_basics->linux_basics_intro_login linux_ssh_exercises_copy_file Exercise: Copy a File To Remote Machine, And Verify linux_ssh_exercises_copy_file->linux_ssh_scp linux_ssh_exercises_copy_file->linux_ssh_key_pair linux_ssh_exercises_copy_file->linux_ssh_basics linux_ssh_exercises_pubkey Exercise: Create SSH Key Pair linux_ssh_exercises_copy_file->linux_ssh_exercises_pubkey linux_ssh_exercises_pubkey->linux_ssh_key_pair