Running everything as root is a security risk. Create a regular user for day-to-day tasks.
Create User
adduser myuserEnter a password and optional user information when prompted.
Grant Sudo Access
usermod -aG sudo myuserOn RHEL-based systems (AlmaLinux, Rocky), use the wheel group:
usermod -aG wheel myuserSet Up SSH Key for New User
su - myuser
mkdir -p ~/.ssh
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys
# Paste your public key
chmod 600 ~/.ssh/authorized_keysTest
ssh myuser@YOUR_IP_ADDRESS
sudo whoami # Should output: root