-
-
Save brpaz/10243211f3f7cd06cc11 to your computer and use it in GitHub Desktop.
creates a deploy user #linux #deploy
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
# Remote Server | |
useradd www-deploy -c "Deployment User" -d /home/www-deploy -G www-data -m -s /bin/bash | |
sudo su - www-deploy | |
# Localhost | |
ssh-keygen -t rsa | |
# Append your key to the Remote host authorized keys file | |
cat id_rsa.pub >> ~/.ssh/authorized_keys | |
# Remote Host | |
#vim /etc/ssh/sshd_config | |
sed -i '/^#*RSAAuthentication /c RSAAuthentication yes' /etc/ssh/sshd_config | |
sed -i '/^#*PubkeyAuthentication /c PubkeyAuthentication yes' /etc/ssh/sshd_config | |
sed -i '/^#*ChallengeResponseAuthentication /c ChallengeResponseAuthentication no' /etc/ssh/sshd_config | |
sed -i '/^#*PasswordAuthentication /c PasswordAuthentication no' /etc/ssh/sshd_config | |
sed -i '/^#*UsePAM /c UsePAM no' /etc/ssh/sshd_config | |
service ssh restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment