- Log on with
ssh root@<public ip>
. - Add new user with
adduser <username>
. - Give that new user sudo permissions with
usermod -aG sudo <username>
- Copy ssh keys from root user to new user
mkdir /home/<username>/.ssh cp ~/.ssh/authorized_keys /home/<username>/.ssh/ chown <username> /home/<username>/.ssh/authorized_keys
- Log out and log on with that new user
ssh <username>@<public ip>
- Update and install packages
sudo apt update sudo apt upgrade -y sudo apt install -y zsh make git clone https://github.com/kylebarron/dotfiles.git /tmp/dotfiles git clone --depth=1 git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting cp /tmp/dotfiles/zsh/materialshell.zsh-theme ~/.oh-my-zsh/themes/ cp /tmp/dotfiles/zsh/zshrc_desktop ~/.zshrc wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda3.sh bash /tmp/miniconda3.sh -b -p ~/local/miniconda3 export PATH=$HOME/local/miniconda3/bin:$PATH sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose link="$(curl -s https://api.github.com/repos/zyedidia/micro/releases/latest | grep 'browser_download_url' | grep 'linux64' | cut -d '"' -f 4)" wget $link -O /tmp/micro.tar.gz mkdir /tmp/micro tar -xzvf /tmp/micro.tar.gz -C /tmp/micro --strip-components 1 mkdir -p ~/local/bin mv /tmp/micro/micro ~/local/bin/ mkdir -p ~/.config/micro cp /tmp/dotfiles/micro/* ~/.config/micro/
- Set ZSH as default shell
chsh -s $(which zsh)
. (Then log out and back in to take effect).
Last active
October 6, 2019 19:56
-
-
Save kylebarron/1b4391c9bcc768fa1a2bf6f0cc5988a0 to your computer and use it in GitHub Desktop.
Starter code for new DO droplet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment