Skip to content

Instantly share code, notes, and snippets.

@nutrun
Created December 9, 2009 17:32
Show Gist options
  • Save nutrun/252619 to your computer and use it in GitHub Desktop.
Save nutrun/252619 to your computer and use it in GitHub Desktop.
Add public SSH key to a remote server's authorized_keys
# twitter.com/michael_jones wrote me
# Put in ~/.profile, or similar
# Use like "authme someuser@someserver"
function authme {
ssh $1 'cat >>~/.ssh/authorized_keys' <~/.ssh/id_rsa.pub
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment