Linux · SSH & Security interview questions

66 real Linux · SSH & Security questions from the System Administration bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

3. Which statement is correct?

Junior
  1. A.ssh-keygen — generate an SELinux policy from denial logs
  2. B.ssh-keygen — generate an SSH public/private key pair
  3. C.ssh-keygen — install your public key on a host for passwordless login
  4. D.ssh-keygen — copy a file to a remote host over SSH
Reveal the answer + AI explanation — free account

4. What does ssh-copy-id user@host do?

Junior
  1. A.let SELinux allow a service on a custom port
  2. B.generate an SELinux policy from denial logs
  3. C.switch SELinux to enforcing mode temporarily
  4. D.install your public key on a host for passwordless login
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.ssh-copy-id user@host — install your public key on a host for passwordless login
  2. B.ssh-copy-id user@host — connect over SSH on a non-default port
  3. C.ssh-copy-id user@host — let SELinux allow a service on a custom port
  4. D.ssh-copy-id user@host — show the SELinux context of files
Reveal the answer + AI explanation — free account

7. What does restorecon -Rv /var/www/html do?

Mid
  1. A.switch SELinux to enforcing mode temporarily
  2. B.reset SELinux contexts to the policy default recursively
  3. C.connect over SSH on a non-default port
  4. D.copy a file to a remote host over SSH
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.restorecon -Rv /var/www/html — install your public key on a host for passwordless login
  2. B.restorecon -Rv /var/www/html — reset SELinux contexts to the policy default recursively
  3. C.restorecon -Rv /var/www/html — switch SELinux to enforcing mode temporarily
  4. D.restorecon -Rv /var/www/html — copy a file to a remote host over SSH
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Junior
  1. A.getenforce — persistently enable an SELinux boolean
  2. B.getenforce — generate an SSH public/private key pair
  3. C.getenforce — print the current SELinux mode
  4. D.getenforce — copy a file to a remote host over SSH
Reveal the answer + AI explanation — free account

13. What does setsebool -P httpd_can_network_connect on do?

Mid
  1. A.install your public key on a host for passwordless login
  2. B.show the SELinux context of files
  3. C.generate an SSH public/private key pair
  4. D.persistently enable an SELinux boolean
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Mid
  1. A.setsebool -P httpd_can_network_connect on — generate an SELinux policy from denial logs
  2. B.setsebool -P httpd_can_network_connect on — connect over SSH on a non-default port
  3. C.setsebool -P httpd_can_network_connect on — show the SELinux context of files
  4. D.setsebool -P httpd_can_network_connect on — persistently enable an SELinux boolean
Reveal the answer + AI explanation — free account

16. What does ls -Z do?

Junior
  1. A.switch SELinux to enforcing mode temporarily
  2. B.reset SELinux contexts to the policy default recursively
  3. C.show the SELinux context of files
  4. D.generate an SELinux policy from denial logs
Reveal the answer + AI explanation — free account

18. Which statement is correct?

Junior
  1. A.ls -Z — create a local SSH port-forward tunnel
  2. B.ls -Z — show the SELinux context of files
  3. C.ls -Z — copy a file to a remote host over SSH
  4. D.ls -Z — let SELinux allow a service on a custom port
Reveal the answer + AI explanation — free account

19. What is SELinux Enforcing mode?

Junior
  1. A.the sshd setting that forces key-only authentication
  2. B.a tool that bans IPs after repeated failed login attempts
  3. C.layering multiple independent security controls
  4. D.the mode that blocks and logs policy violations
Reveal the answer + AI explanation — free account

21. Which statement is correct?

Junior
  1. A.SELinux Enforcing mode — a hardening standard of recommended secure configurations
  2. B.SELinux Enforcing mode — the SELinux model labeling processes and files with types
  3. C.SELinux Enforcing mode — a hardened jump host that gates SSH access to internal servers
  4. D.SELinux Enforcing mode — the mode that blocks and logs policy violations
Reveal the answer + AI explanation — free account

22. What is SELinux Permissive mode?

Junior
  1. A.layering multiple independent security controls
  2. B.the SELinux model labeling processes and files with types
  3. C.a tool that bans IPs after repeated failed login attempts
  4. D.the mode that logs policy violations but does not block them
Reveal the answer + AI explanation — free account

24. Which statement is correct?

Junior
  1. A.SELinux Permissive mode — a hardening standard of recommended secure configurations
  2. B.SELinux Permissive mode — the SELinux model labeling processes and files with types
  3. C.SELinux Permissive mode — a hardened jump host that gates SSH access to internal servers
  4. D.SELinux Permissive mode — the mode that logs policy violations but does not block them
Reveal the answer + AI explanation — free account

25. What is PermitRootLogin no?

Senior
  1. A.the SELinux model labeling processes and files with types
  2. B.the mode that logs policy violations but does not block them
  3. C.the sshd setting that forces key-only authentication
  4. D.the sshd setting that disables direct root SSH login for hardening
Reveal the answer + AI explanation — free account

27. Which statement is correct?

Senior
  1. A.PermitRootLogin no — a hardened jump host that gates SSH access to internal servers
  2. B.PermitRootLogin no — the OpenSSH server configuration file
  3. C.PermitRootLogin no — a hardening standard of recommended secure configurations
  4. D.PermitRootLogin no — the sshd setting that disables direct root SSH login for hardening
Reveal the answer + AI explanation — free account

30. Which statement is correct?

Junior
  1. A.ssh -p 2222 user@host — switch SELinux to enforcing mode temporarily
  2. B.ssh -p 2222 user@host — copy a file to a remote host over SSH
  3. C.ssh -p 2222 user@host — generate an SSH public/private key pair
  4. D.ssh -p 2222 user@host — connect over SSH on a non-default port
Reveal the answer + AI explanation — free account

Showing 30 of 66 Linux · SSH & Security questions — the full set, with answers, explanations and an AI tutor on every question, is inside.

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Linux · SSH & Security free