Skip to content

Instantly share code, notes, and snippets.

@thiagoeh
Last active March 27, 2018 01:41
Show Gist options
  • Save thiagoeh/e826cc2d8632983faff68f45daf0dfa1 to your computer and use it in GitHub Desktop.
Save thiagoeh/e826cc2d8632983faff68f45daf0dfa1 to your computer and use it in GitHub Desktop.
SSH setup for a new host
#!/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