#!/bin/bash USER=deploy KEYS_PATH=https://github.com/chloerei.keys useradd -s /bin/bash -m deploy passwd $USER adduser $USER sudo mkdir /home/$USER/.ssh wget $KEYS_PATH -O /home/$USER/.ssh/authorized_keys chmod 700 /home/$USER/.ssh chmod 600 /home/$USER/.ssh/authorized_keys chown -R $USER:$USER /home/$USER/.ssh/ sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config service ssh restart