Skip to content

Instantly share code, notes, and snippets.

@floodedcodeboy
Created May 20, 2013 10:46
Show Gist options
  • Save floodedcodeboy/5611578 to your computer and use it in GitHub Desktop.
Save floodedcodeboy/5611578 to your computer and use it in GitHub Desktop.
Nice little bash function for adding ssh keys to remote hosts. Place this in your .profile file or where ever you're comfortable having this.
function setup_remote_key() {
cat ~/.ssh/id_rsa.pub | ssh $@ "cat - >> ~/.ssh/authorized_keys"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment