Created
May 17, 2021 00:36
-
-
Save ChrisCooper/3238a39dc6431a0d19bc0fd2a9a5d40c to your computer and use it in GitHub Desktop.
Setup SSH for new Ubuntu 20.04 machine
This file contains hidden or 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
# 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