Difference between revisions of "Debian Linux Post Install Steps"
(→Do not install recommended and suggested packages) |
|||
Line 19: | Line 19: | ||
== Do not install recommended and suggested packages == | == Do not install recommended and suggested packages == | ||
− | cat >/etc/apt/apt.conf.d/50norecommends | + | cat <<EOT >/etc/apt/apt.conf.d/50norecommends |
APT::Install-Recommends "false"; | APT::Install-Recommends "false"; | ||
APT::Install-Suggests "false"; | APT::Install-Suggests "false"; | ||
− | EOT | + | EOT |
== Create a user == | == Create a user == |
Revision as of 14:45, 13 March 2019
Contents
Introduction
Everything on this page needs to be done as root, unless specified, so su to root.
sudo -i
Set hostname
hostnamectl set-hostname sky.mgk.ro reboot
Update the software
apt update && apt -y upgrade reboot
Do not install recommended and suggested packages
cat <<EOT >/etc/apt/apt.conf.d/50norecommends APT::Install-Recommends "false"; APT::Install-Suggests "false"; EOT
Create a user
useradd -c 'Aram Hăvărneanu' -G users -m -s /bin/bash -g staff aram passwd -l aram
Enable passwordless sudo for the staff group:
echo '%staff ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/91-staff-no-password
SSH
For ssh access, use su to switch from root to the user and then add ssh keys.
su - aram # as a user mkdir -p .ssh echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIANJ9BKKslS9Zqp1dRWL1nRiLmFp7nGvP06zPJ4L7cES aram@emerald.local' >> .ssh/authorized_keys echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJnkro8LT0TS+NTOIB787wfqIwv2VTmXXYsnsoVk71UE aram@horizon.local' >> .ssh/authorized_keys chmod 700 .ssh chmod 644 .ssh/authorized_keys