CS 9E - Assignment 2

Remote Process Execution

Background

Overview

This assignment will give you an introduction to networking, SSH, and how to do remote process execution.

Reading

Das: Ch. 13.12, 14.1-14.9

/share/b/pub/ssh.help

Assignment

Part 1 - Create SSH Key

Create a single passphrase protected ssh key for both accounts, and setup your accounts to allow logins based on this key.

Part 2 - SSH Agent

You can use ssh-agent to store your keys after they have been decrypted with your passphrase. This way, you can enter your passphrase once (when you execute ssh-add) rather than every time you make a connection with ssh. Setup ssh-agent, add your key to the agent, and connect to your other account using without needing to enter a passphrase or password. Save this session to a transcript which you will show your tutor for a checkoff. (Note/Clarification: You will need to enter your passphrase when you add your key to the agent, but you don't enter the passphrase when connecting to the other account.)

Part 3 - Remote Process Execution

Using a bash for loop, ssh, and other common unix commands, create an alias (Das: 9.4) that lists all users logged on to any of the following servers: nova, quasar, and pulsar. You should not need to enter a password (hint, finish part 2 fist), and your list should be sorted with no repeated entries. For checkoff, bring in a transcript which shows the alias definition and usage.

Assignment Checklist

Part 1

  • Student can demonstrate logging in to both accounts using their ssh key (not password).

Part 2

  • Student's transcript shows correct usage of ssh-agent and ssh-add.

Part 3

  • Student's transcript shows correct alias definition and usage.