#!/bin/bash
################################################################################
# This script add lab's id_pub_isa to remote lab's authorized_keys.
################################################################################
usage()
{
echo "Usage: `basename $0` -u username -p password -a ip_address"
echo "Note: During excution, you may need to input enter and lab password serveral times"
exit 0
}
[ $# -lt 1 ] && usage
while getopts :u:p:a:h input
do
case $input in
u) RUSER=$OPTARG
;;
p) RPASSWD=$OPTARG
;;
a) RIP=$OPTARG
if expr m