IT3110 - System Automation

IT3110 @ utahtech

Week 2 Assignment

Description

For this assignment you should create a script that receives three command-line arguments. The first argument is an IP address the second is a number (selection). The last one is the username that the script should ssh as. Your script MUST expect passwordless ssh to work. If you have to manually do anything during script execution, you need to fix it. Remember that do do passwordless ssh, you can use the ssh-copy-id command to copy your keys to a remote machine. For example, if you are on the ssh server and want to login to scratch without a password, you can do ssh-copy-id d0000xxyy@scratch

The script does the following based on the number that they pass in:

You should have a main function that checks to see if any of the required input parameters are blank. If so, it should exit with a status of 1(one). Otherwise, it determines what the selection variable is set to and calls the appropriate function.

Notes

Submission