Permalink
Browse files

Minor fix

  • Loading branch information...
1 parent a3e683b commit a067285436e25849096d553ee25d7c0649af543d @darconeous committed Feb 14, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 bin/push-ssh-key
View
@@ -32,8 +32,16 @@
# * <http://creativecommons.org/publicdomain/zero/1.0/>
#
+[ "$1" = "" ] && {
+ echo syntax: $0 '<host>'
+ exit 1
+}
-[ "$1" = "" ] && { echo syntax: $0 '<host>' ; exit 1 ; }
+[ -f ~/.ssh/id_dsa.pub ] || {
+ echo ~/.ssh/id_dsa.pub doesn\'t exist.
+ echo Running \'sshkeygen -t dsa\' . . .
+ ssh-keygen -t dsa || exit -1
+}
ssh $1 "mkdir -p .ssh ; cat >> .ssh/authorized_keys2" < ~/.ssh/id_dsa.pub

0 comments on commit a067285

Please sign in to comment.