Skip to content

Instantly share code, notes, and snippets.

@ChrisCooper
Created May 17, 2021 00:36
Show Gist options
  • Save ChrisCooper/3238a39dc6431a0d19bc0fd2a9a5d40c to your computer and use it in GitHub Desktop.
Save ChrisCooper/3238a39dc6431a0d19bc0fd2a9a5d40c to your computer and use it in GitHub Desktop.
Setup SSH for new Ubuntu 20.04 machine
# print commands
set -x
sudo apt-get update
sudo apt-get upgrade -y
sudo apt install -y git net-tools tmux tree vim
# Install SSH sever
sudo apt install -y ssh openssh-server
# Enable on startup and start the SSH server daemon
sudo systemctl enable --now ssh
# Check SSH server daemon status
sudo systemctl status ssh
# Allow connections through firewall
sudo ufw allow ssh
# Get see machine ip address to SSH to from another computer
hostname -I
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment