After creating the server (droplet on DigitalOcean) log in with
ssh root@[IP ADDRESS]Once inside the machine set a password for root:
passwdUpdate your package manager:
apt-get update
apt-get upgradeInstall fail2ban:
apt-get install fail2banInstall vim:
apt-get install vim vim-scripts vim-doc vim-latexsuite vim-gui-common vim-gnome vim-gtkCreate a new user:
useradd deploy
mkdir /home/deploy
mkdir /home/deploy/.ssh
chmod 700 /home/deploy/.sshAdd your ssh key:
vim /home/deploy/.ssh/authorized_keys #add your public ssh key here, copy your ssh key with: pbcopy < ~/.ssh/id_rsa.pub
chmod 400 /home/deploy/.ssh/authorized_keys #permissions
chown deploy:deploy /home/deploy -R #permissionsGive the new user a sudo password:
passwd deployAnd add the user to the superuser group
visudoAdd into the file:
root ALL=(ALL) ALL
deploy ALL=(ALL) ALLDisable root login and password authentication
vim /etc/ssh/sshd_configEdit:
PermitRootLogin no
PasswordAuthentication no
AllowUsers deploy@(your-ip) deploy@(another-ip-if-any)Restart the ssh service
service ssh restartNow test your login with the new user in a new shell:
ssh deploy@[ID ADDRESS]
Hi do you have a guide like this for apache on digital ocean too, I created a 1 click WordPress app which sets up an ubuntu/apache.
I did manually update/add HTTP/2 support but my ssl/domain still shows HTTP/1.1