Archived
1
0
Fork 0
This repository has been archived on 2023-08-09. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/install/common.sh

55 lines
895 B
Bash
Raw Normal View History

2022-05-10 01:25:44 +02:00
#!/bin/bash
set -e
2022-05-10 01:25:48 +02:00
if [ "$(id -u)" = "0" ]; then
echo "You probably don't want to run this as root!"
echo "Do this first:"
echo "adduser caspervk"
echo "adduser caspervk sudo"
exit 1
fi
2022-05-10 01:25:44 +02:00
# 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"