Friday 24 January 2020

New server first steps


# Basics
apt update
apt upgrade

apt install emacs

# Security
emacs /etc/ssh/sshd_config

diff  /etc/ssh/sshd_config~ /etc/ssh/sshd_config
56c56
< #PasswordAuthentication yes
---
> PasswordAuthentication no

service ssh restart

# Test that...
exit

ssh root@mahserver -o PubkeyAuthentication=no
# root@mahserver: Permission denied (publickey).

# Belt and braces
apt install fail2ban
fail2ban-client status sshd

# Cosmetic
emacs .bash_aliases

cat .bash_aliases
alias lt='ls -latr'

alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'

apt install ecryptfs-utils

adduser bioblog --encrypt-home




No comments: