Last active
June 13, 2025 10:01
-
-
Save samqi/d324630e910b095c9fe3d31b762ff99d to your computer and use it in GitHub Desktop.
AWS
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
sudo timedatectl set-timezone "Asia/Kuala_Lumpur" | |
# update OS & install necessary stuff | |
sudo apt update -y && sudo apt install byobu multitail htop iftop screen -y | |
#vim environment to be windows friendly colorscheme | |
echo "syntax on | |
colorscheme desert" > ~/.vimrc | |
# check date adn time | |
date | |
# enable UFW | |
ufw enable | |
# allow a set of default ports - ssh from office IP range and web ports | |
ufw allow 80 | |
ufw allow 443 | |
# reload configuration | |
ufw reload | |
exit | |
######################### |
for ubuntu 24.04, to harden SSHd
cd /etc/ssh
sudo cp -rfp sshd_config.ucf-old ssh_config.d/sshd_config
# Disallow root logins over SSH & Disable SSH password authentication
PermitRootLogin no
# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no
# restart sshd
sudo systemctl enable --now ssh.service
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ubuntu way:
for ssh keys :