Which of the following will prevent non-root SSH access to a Linux server?
Which of the following will prevent non-root SSH access to a Linux server?
A . Creating the /etc/nologin file
B . Creating the /etc/nologin.allow file containing only a single line root
C . Creating the /etc/nologin/login.deny file containing a single line +all
D . Ensuring that /etc/pam.d/sshd includes account sufficient pam_nologin.so
Answer: A
Explanation:
This file prevents any non-root user from logging in to the system, regardless of the authentication method. The contents of the file are displayed to the user before the login is terminated. This can be useful for system maintenance or security reasons12.
References: 1: Creating the /etc/nologin File – Oracle 2: How to Restrict Log In Capabilities of Users on Ubuntu
Latest XK0-005 Dumps Valid Version with 136 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund