Roman-Sky
6/14/2017 - 8:00 PM

New VPS setup

New VPS setup

# as root
apt-get install bash-completion
adduser admin
usermod -aG sudo admin

# copy public key to /home/admin/.ssh/authorized_keys:
# from remote:
ssh-copy-id admin@server.com # enter admin password
# check if connection through ssh key is working before moving next

# as root
nano /etc/ssh/sshd_config
#####
PasswordAuthentication no
PubkeyAuthentication yes
ChallengeResponseAuthentication no
#####
systemctl reload sshd

sudo apt-get remove apache2