Skip to content

Instantly share code, notes, and snippets.

@hyfather
Created December 16, 2011 08:05
Show Gist options
  • Save hyfather/1485045 to your computer and use it in GitHub Desktop.
Save hyfather/1485045 to your computer and use it in GitHub Desktop.
ssh-copy-id
#!/bin/bash
ssh-add
ssh $1 "mkdir -p .ssh && touch .ssh/authorized_keys && echo `ssh-add -L` >> .ssh/authorized_keys"
# keep this file in the PATH. like in /usr/bin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment