Last active
March 27, 2018 01:41
-
-
Save thiagoeh/e826cc2d8632983faff68f45daf0dfa1 to your computer and use it in GitHub Desktop.
SSH setup for a new host
This file contains 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
#!/bin/bash | |
# SSH server installation | |
sudo apt-get update | |
sudo apt-get install --yes ssh | |
# mosh and tmux make life easier :) | |
sudo apt-get install --yes mosh tmux | |
# Importing public key from GitHub | |
ssh-import-id gh:thiagoeh | |
# Add current user to sudoers | |
sudo usermod -a -G sudo $(whoami) | |
# TODO: | |
# disable root login in sshd_config | |
# lock root password login |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment