Created
February 9, 2020 10:23
-
-
Save wouterds/1465649be1d39b07f8eef33f5719ee36 to your computer and use it in GitHub Desktop.
Droplet setup essentials
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
| # login | |
| ssh root@server | |
| # install updates | |
| sudo apt-get update && sudo apt-get upgrade -y | |
| # install some utils | |
| sudo apt-get install -y git zsh wget curl htop | |
| # firewall | |
| sudo apt-get -y install ufw | |
| sudo ufw default deny incoming | |
| sudo ufw default allow outgoing | |
| sudo ufw allow ssh | |
| # add new user | |
| sudo adduser something | |
| # add user to sudoers | |
| #/etc/sudoers | |
| something ALL=NOPASSWD: ALL | |
| # logout & copy ssh-key | |
| ssh-copy-id something@server | |
| # login with new user | |
| ssh something@server | |
| # strengthen ssh settings | |
| #/etc/ssh/sshd_config | |
| #ChallengeResponseAuthentication no | |
| #PasswordAuthentication no | |
| #UsePAM no | |
| #PermitRootLogin no | |
| sudo service ssh restart | |
| # install oh-my-zsh | |
| sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment