sábado, 25 de julho de 2020

First server configuration

apt update -y && apt upgrade -y
apt install sudo

### Create user
export USERNAME='user'
export PASSWORD='userpassword'
useradd -m -p $(openssl passwd -1 ${PASSWORD}) -s /bin/bash -G sudo ${USERNAME}
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

### SSH Config
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bkp
sed '/MaxAuthTries/d' /etc/ssh/sshd_config.bkp > /etc/ssh/sshd_config
echo "MaxAuthTries 3" >> /etc/ssh/sshd_config
grep "^MaxAuthTries" /etc/ssh/sshd_config

cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bkp
sed '/PermitRootLogin/d' /etc/ssh/sshd_config.bkp > /etc/ssh/sshd_config
echo "PermitRootLogin no" >> /etc/ssh/sshd_config
grep "^PermitRootLogin" /etc/ssh/sshd_config

/etc/init.d/ssh restart

### Install the Basics
apt install curl git net-tools build-essential tmux screen

Um comentário:

  1. We have invested $35 million in upgrading tools and services, and contuine to take a position. Heartland Fabrication has convenient access for truck, rail, and barge transport to Glass Teapots with Infuser and from our Brownsville, Pennsylvania location. Invisible Shield nano-scale glass coating is a professional-grade, high efficiency, poly-siloxane, ultra-hyrdophobic coating with UV initiator technology. It durably seals and protects inside and exterior glass towards wear, corrosion and degradation from environmental publicity. Strategic Sourcing has added ProShred Security to the roster of Preferred Suppliers offering paper shredding services and onerous drive destruction services. The Property Office administers a separate accounting program for tools that's fabricated on campus.

    ResponderExcluir