#!/bin/ksh REMOTE_MACHINE=lightning.its.iastate.edu #desktop> ssh-keygen -t dsa -N "" -f ~/.ssh/id_dsa #desktop> scp ~/.ssh/id_dsa.pub Lightning.its:desktop.dsa #Lightning> cat desktop.dsa >> ~/.ssh/authorized_keys #Lightning> /bin/rm desktop.dsa #Lightning> chmod 644 ~/.ssh/authorized_keys if [ ! -a ~/.ssh/id_dsa ] ; then ssh-keygen -t dsa -N "" -f ~/.ssh/id_dsa fi scp ~/.ssh/id_dsa.pub ${REMOTE_MACHINE}:desktop.dsa ssh ${REMOTE_MACHINE} 'cat desktop.dsa >> ~/.ssh/authorized_keys; chmod 644 ~/.ssh/authorized_keys' ssh ${REMOTE_MACHINE} '/bin/rm desktop.dsa'