Lab 6

Part I

SSH to scratch. Download through the command line the file found here. You must be logged into scratch when you download the file.

After you have it downloaded, extract the tar file in your home directory. Remove lab6.tar. Navigate into the newly extracted directory and add the following 2 files: (the content of the file follows the filename. You should make sure the content is in the files and is correct. NOTE: No extra spaces and no extra lines in the file. Make sure you have the same checksums as listed.

Remove quote2.txt.

Rename quote3.txt to superquote.txt.

Delete everything after the word windows in quote1.txt. (Results of sum quote1.txt should be 27147)

Re-tar your lab6 directory. Make sure it is located in your home directory on scratch.

Use command line scp (There are no GUI’s on the test) to copy your new lab6.tar over to your home directory on your virtual machine.

While logged into your virtual machine run the following command and take a screenshot

tar -tvf lab6.tar; tar -xf lab6.tar --to-stdout | sort | sum

Part II

Log into scratch. find a file called swedish-words.txt located somewhere in the /usr/share directory. Copy the file to your $HOME directory. The new file should be named words.

Run the command cat words; cat words | wc -l; to view the file and count the lines. The count should be 99171 words.

scp the words file to your $HOME directory on your virtual machine.

ssh to your virtual machine.

Check your work. Make sure the file arrived. cat words | wc -l.

Append the output of ls -l /home/joe to the end of the file.

Check your work again. cat words; cat words | wc -l;. If you haven’t added any extra files to joe’s account, then the count should be 99180.

Run tail -n 20 words; wc -l words; and take a screenshot, including the command prompt.

Part III

Prove that you can login from scratch to your virtual machine without the use of a password. To do this you will have to put your ssh public key in your users authorized_keys folder on that machine. This can be done by using the ssh-copy-id command.

Take a screenshot showing that typing the ssh command connects you to your virtual machine without asking for a password. Include the scratch prompt, ssh command and successful vm login prompt

To pass off

Submit your three screenshots in Canvas.

Last Updated 02/13/2019