47 lines
712 B
Bash
Executable file
47 lines
712 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Packages
|
|
sudo apt update
|
|
sudo apt upgrade
|
|
sudo apt install -y \
|
|
openssh-server \
|
|
git \
|
|
curl \
|
|
wget \
|
|
dnsutils \
|
|
rsync \
|
|
htop \
|
|
tmux \
|
|
ufw \
|
|
vnstat \
|
|
ntp \
|
|
pwgen \
|
|
fish \
|
|
source-highlight
|
|
#zsh \
|
|
#zsh-syntax-highlighting \
|
|
#zsh-autosuggestions \
|
|
|
|
|
|
# Shell
|
|
#chsh -s /bin/zsh
|
|
#ln -sr .zshrc ~/
|
|
chsh -s /usr/bin/fish
|
|
|
|
|
|
# SSH
|
|
read -p "Please set sshd port to 222"
|
|
sudo nano /etc/ssh/sshd_config
|
|
|
|
ssh-keygen -t ed25519
|
|
ln -sr authorized_keys ~/.ssh/authorized_keys
|
|
ln -sr ssh_config ~/.ssh/config
|
|
|
|
|
|
# Firewall
|
|
sudo ufw default deny incoming
|
|
sudo ufw default allow outgoing
|
|
sudo ufw allow 222/tcp comment "sshd"
|