Permalink
Browse files

Delegate to hubkey for the SSH key

  • Loading branch information...
1 parent 4fbbf87 commit d5521f4673ea38f6b4d6996f9f0d92276623704f @rking rking committed with rkingpa@sharpsaw.org Jan 25, 2013
Showing with 4 additions and 11 deletions.
  1. +4 −11 bin/brogrammer
View
@@ -1,12 +1,5 @@
#!/bin/sh -xe
-if [ $1 != '-k' ]; then
- sudo useradd -m -G pair $1
- sudo sed -i "s/AllowUsers/& $1/" /etc/ssh/sshd_config
- sudo /etc/init.d/sshd restart
- ssh_dir=/home/$1/ssh
- sudo -u $1 mkdir $ssh_dir
-else
- shift
-fi
-sudo -u $1 vim $ssh_dir/authorized_keys +set\ tw=0
-sudo -u $1 chmod go-rwx $ssh_dir -R
+sudo useradd -m -G pair $1
+sudo sed -i "s/AllowUsers/& $1/" /etc/ssh/sshd_config
+sudo /etc/init.d/sshd restart
+hubkey $1 $2

0 comments on commit d5521f4

Please sign in to comment.