What will happen when users try to connect with ssh?

The files /etc/hosts.allow, /etc/hosts.deny and /etc/nologin all exist on your computer and the sshd daemon is running. What will happen when users try to connect with ssh?

The files /etc/hosts.allow, /etc/hosts.deny and /etc/nologin all exist on your computer and the sshd daemon is running. What will happen when users try to connect with ssh?

A.
Only connections from computers specified in /etc/hosts.allow will be allowed to log in.

B.
Only root will be allowed to log in.

C.
All users not specified in /etc/hosts.deny will be allowed to log in.

D.
No user will be allowed to log in.

Explanation:
From http://docstore.mik.ua/orelly/networking_2ndEd/ssh/ch05_06.htm#ch05-42-fm2xml:
If the file /etc/nologin exists, sshd allows only root to log in; no other accounts are allowed access. Thus, touch /etc/nologin is a quick way to restrict access to the system administrator only, without having to reconfigure or shut down SSH.



Leave a Reply 0

Your email address will not be published. Required fields are marked *