Root vs Kali User: Should Remote SSH Permit Root Login?
0 reputation · 28 Dec 2023, 12:04 UTC
0 reputation · 28 Dec 2023, 12:04 UTC
Enable secure remote administration on a fresh Kali Linux installation.
Kali ships with the kali user that has sudo privileges, while the root account is disabled by default to curb accidental system damage. Enabling root login requires setting a password and editing /etc/ssh/sshd_config to PermitRootLogin yes. Documentation recommends day‑to‑day use of the kali user and elevating privileges only when necessary. The trade‑off between operational convenience and security posture remains unresolved.
root login for remote SSH?root access versus using sudo from the kali account?PermitRootLogin prohibit-password) are recommended when root access is required?Kali documentation only recommends enabling root SSH login in dedicated lab, penetration‑testing, or tool‑specific scenarios where a permanent root account is required and cannot be run via sudo.
The default security posture limits root access to reduce accidental damage and maintain an audit trail through sudo. Enabling root login removes per‑command logging and increases exposure to brute‑force attacks, especially with password authentication.
passwd only if password authentication is intended./etc/ssh/sshd_config and set PermitRootLogin prohibit-password for key‑only access, or yes if password authentication is required./root/.ssh/authorized_keys.systemctl restart ssh.ssh root@host using the chosen authentication method.Do you plan to use password authentication or key‑based authentication for root login? This determines whether PermitRootLogin prohibit-password or yes is appropriate.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.