Created
June 20, 2009 11:49
-
-
Save okiess/133144 to your computer and use it in GitHub Desktop.
This file contains 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/bash | |
adduser deploy | |
mkdir /home/deploy/.ssh | |
cp /root/.ssh/authorized_keys /home/deploy/.ssh | |
chmod 700 /home/deploy/.ssh | |
chmod 600 /home/deploy/.ssh/authorized_keys | |
chown -R deploy:deploy /home/deploy | |
apt-get update && apt-get install sudo | |
echo "deploy ALL=NOPASSWD: ALL" >> /etc/sudoers | |
sudo -u deploy ssh-keygen | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment