Skip to content

Instantly share code, notes, and snippets.

@okiess
Created June 20, 2009 11:49
Show Gist options
  • Save okiess/133144 to your computer and use it in GitHub Desktop.
Save okiess/133144 to your computer and use it in GitHub Desktop.
#!/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