Created
January 26, 2009 15:11
-
-
Save zmack/52834 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
KEY="$HOME/.ssh/id_dsa.pub" | |
if [ ! -f $KEY ];then | |
echo "private key not found at $KEY" | |
echo "please create it with \"ssh-keygen -t dsa\"" | |
exit | |
fi | |
if [ -z $1 ];then | |
echo "Usage: $0 username@host" | |
exit | |
fi | |
echo "Putting your key on $1... " | |
ssh -q $* "umask 0077; mkdir -p ~/.ssh ; echo "`cat $KEY`" >> ~/.ssh/authorized_keys" | |
echo "done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment