Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # A shell script for setting up a Vultr box with docker, docker-compose, vim, tmux and a deploy user
- # This is the most equivalent I could find to a t2.small on a CentOS 7 x64 system - 1 VCP, 2 Gig Ram, 40 Gig. disk
- # Install required to run docker etc.
- yum install -y tmux docker git docker-compose
- # Create deploy user and add your public key to login
- useradd deploy
- mkdir /home/deploy/.ssh
- chmod 700 /home/deploy/.ssh
- vim /home/deploy/.ssh/authorized_keys # Add you public key
- chmod 400 /home/deploy/.ssh/authorized_keys
- chown deploy:deploy /home/deploy -R
- # Add depoy user to the sudo group visudo - Comment all existing user/group grant lines and add:
- root ALL=(ALL) ALL
- deploy ALL=(ALL) ALL
- # Disable root and lock down the user per an IP Address as well as public key
- vim /etc/ssh/sshd_config
- PermitRootLogin no
- PasswordAuthentication no
- AllowUsers deploy@xxx.xxx.xxx.xxx deploy@yyy.yyy.yyy.yyy
- service ssh restart
Add Comment
Please, Sign In to add comment