NDG Introduction to Linux II 2.21 | Chapter 18: Encryption Exam Answers

This is NetAcad Cisco NDG Introduction to Linux II 2.21 – Chapter 18: Encryption Exam Answers full 100% in 2023 – 2024. All answers have been verified by experts.

  1. Which file is used to configure SSH clients?

    • /etc/sshd_config 
    • /etc/ssh/ssh_config 
    • /etc/ssh/sshd_config 
    • /etc/ssh_config
    • Explanation & Hint:

      The file used to configure SSH clients is:

      /etc/ssh/ssh_config
      This file is the system-wide configuration file for SSH client behavior. It contains configuration options that control how the SSH client behaves when connecting to remote servers. The file /etc/ssh/sshd_config is used for configuring the SSH server (sshd) behavior on the remote host.
  2. The SSH utility is provided by the OpenSSH package.

    True or False?

    • True
    • False
    • Explanation & Hint:

      True. The SSH utility is indeed provided by the OpenSSH package. OpenSSH (Open Secure Shell) is a widely used implementation of the SSH (Secure Shell) protocol, which provides encrypted communication over a network. It includes utilities for secure remote login, file transfer, and tunneling, among other functionalities.

  3. The system has a /etc/ssh/ssh_config file and the user Mike also has a ~/.ssh/config in his home directory. Which file will be used when David connects to a server via SSH?

    • ~/etc/.ssh/config
    • Both files will be used
    • /etc/ssh/ssh_config
    • ~/.ssh/config
    • Explanation & Hint:

      When David connects to a server via SSH, the configuration file that will be used is:

      ~/.ssh/config

      The ~/.ssh/config file in David’s home directory takes precedence over the system-wide configuration file /etc/ssh/ssh_config. If both files exist, the user-specific configuration file will be used to determine the SSH client behavior and settings for that user’s connections.

  4. What does the ~/.ssh/id_rsa file contain?

    • RSA public key of the user
    • RSA private signature of the user
    • RSA public signature of the user
    • RSA private key of the user
    • Explanation & Hint:

      The ~/.ssh/id_rsa file contains the:

      RSA private key of the user

      This private key is used for authentication when connecting to remote servers using the SSH protocol. It is important to keep the private key secure and not share it with others. The corresponding public key (~/.ssh/id_rsa.pub) is usually stored in the ~/.ssh/authorized_keys file on the remote servers to allow secure authentication without transmitting passwords over the network.

  5. What does the entry AllowGroups dba netusers in the /etc/ssh/sshd_config indicate?

    • Users who are part of the dba and netusers groups will be allowed access 
    • Users with usernames dba and netusers will be allowed access
    • Users who are not part of the dba and netusers groups will be allowed access
    • Users who are part of the dba and netusers groups will not be allowed access
    • Explanation & Hint:

      The entry AllowGroups dba netusers in the /etc/ssh/sshd_config file indicates that:

      Users who are part of the dba and netusers groups will be allowed access

      This configuration line restricts SSH access to users who are members of either the dba group or the netusers group. Other users who are not part of these groups will not be allowed SSH access.

  6. The _____ command is used to generate SSH keys.

    • sshkey-gen
    • ssh-keygen 
    • sshgen-key 
    • ssh-genkey
    • Explanation & Hint:

      The correct command to generate SSH keys is:

      ssh-keygen
      The ssh-keygen command is used to generate SSH key pairs, which include a public key and a corresponding private key. These keys are used for secure authentication and encryption when connecting to remote servers using the SSH protocol.
  7. The size of a DSA key is:

    • Exactly 1024 bits 
    • Exactly 1000 bits
    • Exactly 768 bits
    • Exactly 2048 bits
    • Explanation & Hint:

      The size of a DSA (Digital Signature Algorithm) key is:

      Exactly 1024 bits

      DSA keys are often used for digital signatures and authentication purposes. However, due to security concerns and advances in computing power, it’s generally recommended to use larger key sizes, such as 2048 bits or more, for better security.

  8. Which of the following is not an authentication method supported by SSH?

    • Password Authentication
    • Signature Authentication 
    • Host Based Authentication
    • Public Key Authentication
    • Explanation & Hint:

      “Signature Authentication” is not a commonly recognized authentication method supported by SSH. The other options mentioned—Password Authentication, Host-Based Authentication, and Public Key Authentication—are indeed authentication methods commonly used with SSH. Signature Authentication is not a standard term in the context of SSH authentication.

  9. Which file on the server holds the public keys of the hosts that need to be authenticated?

    • /etc/ssh/ssh_known_hosts 
    • /etc/ssh/ssh_hosts 
    • ~/ssh/ssh_known_hosts 
    • /etc/ssh/ssh_hosts_known
    • Explanation & Hint:

      The file on the server that holds the public keys of the hosts that need to be authenticated is:

      /etc/ssh/ssh_known_hosts
      This file contains a list of known host public keys and their associated hostnames or IP addresses. It’s used to verify the authenticity of the remote hosts when connecting via SSH. The SSH client checks this file to ensure that the remote host’s public key matches the known key, helping to prevent man-in-the-middle attacks.
  10. Which of the following entries in /etc/ssh/sshd_config turn on host based authentication?

    • HostbasedAuthentication: yes 
    • HostbasedAuthentication enable 
    • Hostbased_Authentication yes 
    • HostbasedAuthentication yes
    • Explanation & Hint:

      The correct entry in /etc/ssh/sshd_config to turn on host-based authentication is:

      HostbasedAuthentication yes

      This configuration line enables host-based authentication for SSH connections. The value yes indicates that host-based authentication should be allowed. The other options you provided are not the correct syntax for enabling host-based authentication in the SSH server configuration file.

  11. Which of the following utility programs are not provided by OpenSSH?

    • smv 
    • ssh 
    • scp 
    • slogin
    • Explanation & Hint:

      The utility program “smv” is not provided by OpenSSH.

      The other options you mentioned, “ssh,” “scp,” and “slogin,” are utility programs provided by OpenSSH:

      • ssh: The SSH client program used to securely log in to remote servers.
      • scp: The secure copy program used to securely transfer files between local and remote systems.
      • slogin: An older synonym for the “ssh” command, used for secure remote login.

      “smv” is not a recognized utility in the context of OpenSSH or SSH-related functionality.

  12. What is the function of the ssh-agent?

    • Cache the decrypted public key and provide it to client programs
    • Cache the decrypted private key and provide it to client programs 
    • Decrypt the private key and provide it to client programs
    • Generate the signature using the private key
  13. Which command is used to add private keys to the SSH agent’s repository?

    • ssh-addkey
    • ssh-agentadd sshadd ssh-add ssh-addkey
    • ssh-add 
    • sshadd
  14. You want to ensure that the ssh-agent is run for all users, which command can be used for this?

    • /etc/ssh/ssh_known_hosts 
    • /etc/inittab 
    • /etc/profile 
    • /etc/ssh/userprofile
  15. The ssh-add utility can be used to add only RSA keys.

    True or False?

    • True
    • False
  16. The ssh-add program ran for user maria, but his RSA identity files were not added, what could be the reason for this?

    • The file /home/maria/.ssh/id_rsa had read permissions for no other user except Maria
    • The file /home/maria/.ssh/id_rsa has read permissions only for Maria
    • The file /home/maria/.ssh/id_rsa had read and write permissions only for Maria
    • The file /home/maria/.ssh/id_rsa has read permissions for users other than Maria
  17. SSH Tunneling is the same as _____.

    • SSH Porting
    • SSH Encoding
    • SSH Encryption
    • SSH Port Forwarding
  18. Which of the following entries in /etc/ssh/sshd_config turn on SSH tunneling?

    • AllowTcpPortForwarding yes 
    • AllowTCPIPForwarding yes 
    • AllowTcpForwarding yes 
    • AllowPortForwarding yes
  19. Which of the following commands are used to setup SSH tunneling?

    • ssh -p 
    • ssh -l 
    • ssh -L 
    • ssh -t
  20. Which of the following commands will start a SSH session with X11 support?

    • ssh -X marks.gsource.com 
    • ssh -x marks.gsource.com 
    • ssh -l marks.gsource.com 
    • ssh -L marks.gsource.com
  21. Which standard is GnuPG based on?

    • Linux Good Privacy (LGP)
    • Pretty Good Privacy (PGP) 
    • SSH Good Privacy (SGP)
    • Unix Good Privacy (UGP)
  22. Which is the default configuration file used by GnuPG?

    • ~/.gnu/gpg.conf
    • ~/.gnupg/.gpg.conf
    • ~/gnupg/gpg.conf
    • ~/.gnupg/gpg.conf
  23. Which command is used to generate a GnuPG key?

    • gpg -gen-key
    • gpg --gen-key
    • gpg-gen --key
    • gpggen --key
  24. The gpg command operates in a ____ mode.

    • verbose
    • interactive
    • silent
    • batch
  25. Which of the following algorithms are not supported by GnuPG for key generation?

    • DSA
    • Elgamal
    • One-way Hash
    • RSA
  26. The SSH and GnuPG keys can be protected by an optional passphrase.

    True or False?

    • True
    • False
  27. Which of the following is not a function provided by GnuPG?

    • Providing encrypted channel for communication
    • Encryption
    • Accessing public keys
    • Digital signature
  28. Which command is used to verify the signature of a package?

    • gpg -V pkg.sig
    • gpg --verify pkg.sig 
    • gpg -v pkg.sig 
    • gpg verify pkg.sig
  29. The ECDSA private key for a user is _______.

    • ~/.ssh/ecdsa.priv 
    • /etc/ssh/ssh_config 
    • ~/.ssh/id_rsa.pub 
    • ~/.ssh/id_ecdsa
  30. The /etc/ssh/ssh_host_ed25519_key.pub file is used by sshd as part of a key value pair.

    True or False?

    • True
    • False
  31. The configuration file /etc/ssh/ssh_host_ecdsa_key is used by the __________ program for ________.

    (choose two)

    • telnet
    • public-private keypair authentication 
    • sending data in clear text
    • sshd
  32. Which public key file is used by sshd to authenticate clients?

    • /home/sysadmin/.gnupg/public-keys-v1.d 
    • sshdhost_ed25519_key.pub 
    • ssh_host_ed25519_key.pub 
    • /etc/ssh/publickey.conf
  33. The gpg-agent daemon caches passphrases only until the next user logs in.

    True or False?

    • True
    • False