Created
June 3, 2013 13:51
-
-
Save tmathmeyer/5698268 to your computer and use it in GitHub Desktop.
autossh install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! $# == 2 ]; then | |
echo "usage autosshinstall useranme@host host-nickname" | |
exit | |
fi | |
ssh-keygen -t rsa | |
ssh-copy-id $1 | |
APP="alias $2='ssh $1'" | |
BASHRC="$HOME/.bashrc" | |
echo $APP >> $BASHRC | |
source $BASHRC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment