LAB4
LAB4
a) `ssh-copy-id`
b) `ssh-keygen`
c) `scp`
d) `ssh-add`
2. Where is the private key file stored by default when generating SSH keys?
a) `~/.ssh/id_rsa`
b) `~/.ssh/id_rsa.pub`
c) `/etc/ssh/ssh_config`
d) `/var/ssh/private`
a) `ssh-copy-id`
b) `scp`
c) `rsync`
d) `ssh-agent`
a) `/etc/ssh/ssh_config`
b) `/etc/ssh/sshd_config`
c) `/etc/hosts`
d) `/etc/passwd`
5. To disable root login, you would set the `PermitRootLogin` directive to:
a) `yes`
b) `no`
c) `prohibit-password`
d) `without-password`
a) `authy`
b) `google-authenticator`
c) `pam-google-authenticator`
d) `duo`
a) `~/.google_authenticator`
b) `/etc/google_authenticator`
c) `/var/google_authenticator`
d) `/etc/pam.d/google_authenticator`
a) `yes`
b) `no`
c) `optional`
d) `enabled`
10. In the PAM configuration file, to enable Google Authenticator, you add:
a) `nano /etc/ssh/ssh_config`
b) `nano /etc/ssh/sshd_config`
c) `vim /etc/ssh/ssh_config`
d) `vim /etc/ssh/sshd_config`
c) Firewall rules
d) Network interfaces
14. To restrict SSH access to a specific user, you can use the directive:
a) `AllowUsers`
b) `DenyUsers`
c) `PermitUsers`
d) `BlockUsers`
a) `DisableCiphers`
b) `WeakCiphers`
c) `Ciphers`
d) `AllowedCiphers`
17. To restart the SSH service on Ubuntu, you use the command:
a) `systemctl restart sshd`
18. The `LogLevel` directive can be set to which of the following for more verbose logging?
a) `QUIET`
b) `FATAL`
c) `INFO`
d) `DEBUG3`
19. Which command will find all files with the SUID bit set?
b) Set User ID
c) Secure User ID
d) Super User ID
a) Users to execute a file with the group permissions of the file owner
b) Groups to execute a file with the user permissions of the file owner
c) Files to be read-only
d) Directories to be immutable
a) `chattr +i filename`
b) `lsattr +i filename`
c) `chmod +i filename`
d) `setattr +i filename`
a) `lsattr`
b) `chattr`
c) `getattr`
d) `setattr`
a) `/etc/ssh/sshd_config`
b) `/usr/local/ssh/sshd_config`
c) `/etc/sshd/sshd_config`
d) `/var/ssh/sshd_config`
- Use the following command to copy your public key to a remote server:
```
#### Lab 4: Applying Hardened Linux File System Security Controls (cont)
- Apply
changes by
restarting the
SSH service: