Difference between revisions of "Fedora Linux Post Install Steps"
(→SSH) |
(→SSH) |
||
Line 60: | Line 60: | ||
echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJnkro8LT0TS+NTOIB787wfqIwv2VTmXXYsnsoVk71UE aram@horizon.local' >> .ssh/authorized_keys | echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJnkro8LT0TS+NTOIB787wfqIwv2VTmXXYsnsoVk71UE aram@horizon.local' >> .ssh/authorized_keys | ||
echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC8dcfsqZJWTNTCfATbD6WiZyWoK3AiihynONRjCrtMw aram@oceanic.local' >> .ssh/authorized_keys | echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC8dcfsqZJWTNTCfATbD6WiZyWoK3AiihynONRjCrtMw aram@oceanic.local' >> .ssh/authorized_keys | ||
+ | echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local' >> .ssh/authorized_keys | ||
chmod 700 .ssh | chmod 700 .ssh | ||
chmod 644 .ssh/authorized_keys | chmod 644 .ssh/authorized_keys |
Latest revision as of 15:34, 8 February 2023
Contents
Introduction
Everything on this page needs to be done as root, unless specified, so su to root.
sudo -i
Cloud Init
If your install uses cloud-init (e.g. Amazon EC2) do the following:
Set hostname
echo 'preserve_hostname: yes' >/etc/cloud/cloud.cfg.d/55-preseve-hostname.cfg echo 'eden.mgk.ro' >/etc/hostname reboot
Enable IPv6
cat <<EOF >/etc/cloud/cloud.cfg.d/56-custom-networking.cfg network: version: 1 config: - type: physical name: eth0 subnets: - type: dhcp - type: dhcp6 EOF reboot
Scaleway
If you're on a braindead platform like Scaleway, you might also need to disable this:
systemctl disable scw-set-hostname
Update the software
dnf -y upgrade-minimal reboot
Create a user
useradd -c 'Aram Hăvărneanu' -G wheel,users -m -s /bin/bash -U aram passwd -l aram
Enable passwordless sudo for the wheel group:
echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/91-wheel-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 AAAAC3NzaC1lZDI1NTE5AAAAIJnkro8LT0TS+NTOIB787wfqIwv2VTmXXYsnsoVk71UE aram@horizon.local' >> .ssh/authorized_keys echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC8dcfsqZJWTNTCfATbD6WiZyWoK3AiihynONRjCrtMw aram@oceanic.local' >> .ssh/authorized_keys echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local' >> .ssh/authorized_keys chmod 700 .ssh chmod 644 .ssh/authorized_keys
Enable NTP service
If not already enabled, enable NTP:
systemctl enable --now ntpd.service
Install packages
For home installations you might want to install avahi.
dnf install nss-mdns avahi systemctl enable --now avahi-daemon.service
For development system you might want to install:
dnf -y groupinstall 'Development Tools' dnf -y install rsync clang clang-tools-extra gcc-go golang