Skip to content

Instantly share code, notes, and snippets.

@tmathmeyer
Created June 3, 2013 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmathmeyer/5698268 to your computer and use it in GitHub Desktop.
Save tmathmeyer/5698268 to your computer and use it in GitHub Desktop.
autossh install
#!/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