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.

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 | 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 again. cat words | wc -l;. The line count should still be 99171.

Part III

Prove that you can login to scratch from 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.

Then, you should be able to ssh to scratch without a password. ssh <yourusername>

To pass off

You must copy my key to your virtual machine. To do this, perform the following steps:

    sudo bash
    chmod +x ./install_key.bash
    rm ./install_key.bash

Run the grade_lab6 command from scratch. You must pass in the ip address of your vm when you run it like:


BUT MAKE SURE THE ABOVE IP is the address of your virtual machine.

Verify that all the tests pass successfully.

Last Updated 02/18/2020