CompTIA XK0-006 Practice Test Questions and Exam Dumps Part 9: Q161–Q180

View Full CompTIA XK0-006 Exam Dumps and Practice Test Dumps.

 

Question 161

Which Linux command can be used to securely copy a file between two systems over SSH?

  1. ftp
  2. scp
  3. telnet
  4. rlogin

Correct Answer: 2

Explanation

The scp command securely copies files between systems using SSH. Because the transfer uses SSH, the data is encrypted while traveling across the network. Administrators can copy files to a remote server or retrieve files from one. SCP is useful for transferring configuration files, scripts, logs, and other administrative data. The destination system must normally have SSH access available. For larger or more interactive file-management tasks, administrators may choose SFTP instead.

Question 162

Which SSH authentication method is generally preferred over passwords for automated administrative access?

  1. SSH public key authentication
  2. Plain-text authentication
  3. Anonymous authentication
  4. Telnet authentication

Correct Answer: 1

Explanation

SSH public key authentication uses a private key on the client and a corresponding public key on the server. It is commonly preferred for automated access because it can provide strong authentication without requiring a password to be entered every time. The private key must be protected carefully because anyone who obtains it may be able to authenticate. Administrators can also use passphrases and SSH agents to improve protection. Key-based authentication is widely used in Linux automation and administration.

Question 163

Which file normally stores authorized SSH public keys for a user’s account?

  1. ~/.ssh/known_hosts
  2. ~/.ssh/config
  3. ~/.ssh/authorized_keys
  4. ~/.ssh/identity.conf

Correct Answer: 3

Explanation

The ~/.ssh/authorized_keys file contains public keys that are allowed to authenticate to a user’s SSH account. When a client proves possession of the matching private key, the SSH server can authenticate the user using the public key stored in this file. Correct ownership and permissions on the .ssh directory and its files are important because overly permissive permissions can cause SSH authentication to be rejected or create security risks. Administrators should protect private keys separately on client systems.

Question 164

Which file controls many system-wide SSH server settings?

  1. /etc/ssh/sshd_config
  2. /etc/ssh/client.conf
  3. /var/ssh/server
  4. /usr/local/ssh/settings

Correct Answer: 1

Explanation

The /etc/ssh/sshd_config file contains configuration settings for the OpenSSH server daemon. Administrators can use it to control options such as the SSH listening port, root login behavior, password authentication, allowed users, and other security settings. Changes should be checked carefully before restarting or reloading the SSH service. A configuration error can prevent new SSH connections. It is good practice to keep an existing administrative session open while testing changes so access is not accidentally lost.

Question 165

Which tool can be used to generate a new SSH key pair?

  1. ssh-keygen
  2. ssh-create-user
  3. keymaker
  4. ssh-newkey

Correct Answer: 1

Explanation

The ssh-keygen command generates and manages SSH key pairs. A key pair normally consists of a private key and a public key. The private key remains on the client and should be protected, while the public key can be placed on systems where access is required. ssh-keygen supports different key types and options. Administrators should protect private keys with appropriate file permissions and, when practical, use a strong passphrase to reduce the impact of key theft.

Question 166

Which command can be used to change the default shell for an existing Linux user?

  1. chsh
  2. shellmod
  3. ushell
  4. setsh

Correct Answer: 1

Explanation

The chsh command can change a user’s login shell. For example, an administrator may change a user’s shell from one supported shell to another. The selected shell generally needs to be listed in /etc/shells for normal use. Changing a user’s shell affects how the user interacts with the system after login, so administrators should choose an appropriate and supported shell. Shell settings can also be managed through account administration tools depending on the Linux distribution.

Question 167

Which file commonly lists valid login shells on a Linux system?

  1. /etc/login.shells
  2. /etc/shells
  3. /var/shells
  4. /usr/shell-list

Correct Answer: 2

Explanation

The /etc/shells file contains a list of valid login shells on many Linux systems. Programs such as chsh can use this file to determine which shells are acceptable for user accounts. Common entries may include Bash and other installed shells. Administrators should be careful when modifying this file because adding an inappropriate executable could allow it to be selected as a login shell. Understanding account and shell configuration is important when managing Linux users securely.

Question 168

Which command can show the password-aging information for a Linux user account?

  1. chage -l
  2. passwd-show
  3. userage
  4. agepasswd

Correct Answer: 1

Explanation

The chage -l command displays password-aging information for a user account. It can show details such as the last password change, minimum and maximum password age, password expiration date, and account inactivity settings. Password-aging policies can help organizations enforce regular credential changes when required by policy. Administrators should balance these settings with current security guidance and organizational requirements. Reviewing account expiration information is also useful when troubleshooting why a user can no longer authenticate.

Question 169

Which Linux file contains account expiration and password-aging information associated with user accounts?

  1. /etc/group
  2. /etc/shadow
  3. /etc/motd
  4. /etc/issue

Correct Answer: 2

Explanation

The /etc/shadow file stores password hashes and additional password-aging information for local Linux accounts. Because it contains sensitive authentication data, access to this file is normally restricted. Administrators can use account-management commands rather than directly editing it in most situations. Information such as password expiration and inactivity settings can affect whether users can authenticate. Protecting /etc/shadow is an important part of Linux system security because unauthorized access to password hashes can create significant risks.

Question 170

Which security control adds an additional authentication factor beyond a password?

  1. MFA
  2. NAT
  3. RAID
  4. DHCP

Correct Answer: 1

Explanation

Multi-factor authentication, or MFA, requires users to provide more than one type of authentication factor. Common factors include something the user knows, such as a password; something the user has, such as a security token; or something the user is, such as a biometric characteristic. MFA reduces the impact of stolen passwords because an attacker may still need the additional factor. Linux environments can integrate MFA with services such as SSH through appropriate authentication modules and identity systems.

Question 171

Which cryptographic technology is commonly used to provide encrypted network communication for many applications and services?

  1. TLS
  2. FTP
  3. ICMP
  4. ARP

Correct Answer: 1

Explanation

TLS, or Transport Layer Security, provides encrypted and authenticated communication for many network applications. HTTPS is a common example where TLS protects web traffic. TLS can help provide confidentiality, integrity, and server authentication when certificates are properly configured. Linux administrators may need to troubleshoot certificate problems, protocol versions, or trust chains when managing TLS-enabled services. Using encrypted protocols is important because sensitive credentials and data should not normally be transmitted across networks in plain text.

Question 172

Which command can be used to inspect the details of an X.509 certificate using OpenSSL?

  1. openssl x509
  2. openssl cert-show
  3. sslview
  4. certctl

Correct Answer: 1

Explanation

The openssl x509 command can display information about X.509 certificates. Depending on the options used, administrators can inspect certificate subjects, issuers, validity dates, serial numbers, and other details. This is useful when troubleshooting HTTPS and other TLS-enabled services. For example, an expired certificate can cause clients to reject a connection even when the server itself is running correctly. OpenSSL is an important Linux security tool for working with certificates, keys, and cryptographic operations.

Question 173

Which command can display listening TCP and UDP sockets on a Linux system?

  1. ss
  2. socketlist
  3. ports
  4. netlisten

Correct Answer: 1

Explanation

The ss command displays socket information and can show listening TCP and UDP ports. It is useful for determining which services are accepting network connections and on which addresses or ports they are listening. During troubleshooting, administrators can compare listening sockets with expected services and firewall rules. For example, if an application should listen on TCP port 443 but no process is listening there, the problem may be with the service rather than the firewall.

Question 174

Which command can show which process is using a specific TCP or UDP port?

  1. ss -lntp
  2. portwho
  3. netprocess
  4. ports -owner

Correct Answer: 1

Explanation

The ss -lntp command can display listening TCP sockets together with process information when sufficient privileges are available. This is useful when a service cannot start because another process is already using the required port. Administrators can identify the process and then investigate its configuration or decide whether it should be stopped. Port conflicts are common troubleshooting issues on Linux servers, particularly when multiple applications are configured to use the same network port.

Question 175

Which command can display the amount of memory currently used and available on a Linux system?

  1. free
  2. memshow
  3. ramstat
  4. memoryctl

Correct Answer: 1

Explanation

The free command displays information about system memory, including total, used, free, shared, cached, and available memory. It is useful when investigating applications that appear to have memory-related problems. The free -h option presents values in a human-readable format. Administrators should pay attention to available memory rather than assuming that all memory shown as used represents a problem, because Linux uses memory for caching to improve performance. Memory pressure should be evaluated with other system information as well.

Question 176

Which command can display detailed CPU information, including processor architecture and supported features?

  1. lscpu
  2. cpuinfo
  3. proc-cpu
  4. cpustat

Correct Answer: 1

Explanation

The lscpu command displays information about the system’s CPU architecture and processors. It can show the architecture, CPU count, cores, threads, sockets, virtualization capabilities, and other processor details. This information is useful when troubleshooting performance or verifying whether a system supports particular software requirements. Administrators can also use it when planning virtualization workloads. Understanding CPU topology can help explain how workloads are distributed across cores and threads on larger Linux systems.

Question 177

Which command can display detailed information about mounted filesystem space usage?

  1. df -h
  2. diskspace -all
  3. storage-show
  4. fsusage

Correct Answer: 1

Explanation

The df -h command displays filesystem space usage in a human-readable format. It shows information such as total capacity, used space, available space, and mount points. It is useful when a server reports that a filesystem is full or applications cannot create new files. If df shows a filesystem is full, administrators can investigate large files, deleted-but-open files, inode usage, logs, and application data. Storage problems should be investigated carefully before deleting anything.

Question 178

A filesystem reports that it has free disk space, but applications cannot create new files. Which resource should you check next?

  1. Inodes
  2. CPU temperature
  3. DNS records
  4. SSH keys

Correct Answer: 1

Explanation

Linux filesystems can run out of inodes even when they still have free data blocks. Inodes store metadata about files, so a system containing a very large number of small files may exhaust its available inodes. When this happens, applications may be unable to create additional files. Administrators can use commands such as df -i to inspect inode usage. This is an important troubleshooting distinction because checking only normal disk capacity may not reveal the actual cause of the problem.

Question 179

Which command can display inode usage for mounted filesystems?

  1. df -i
  2. inode-show
  3. fs -inode
  4. disk -nodes

Correct Answer: 1

Explanation

The df -i command displays inode usage for mounted filesystems. It can show the total number of inodes, how many are used, how many remain available, and the percentage used. This is useful when applications cannot create files even though normal disk space appears available. If inode usage is very high, administrators should investigate directories containing huge numbers of small files, such as caches, temporary files, mail queues, or application-generated data.

Question 180

Which command can help identify files or directories consuming the most disk space within a filesystem?

  1. du
  2. spacefind
  3. diskwho
  4. fslarge

Correct Answer: 1

Explanation

The du command reports disk usage for files and directories. It is commonly used to locate directories that consume large amounts of storage. For example, an administrator can use human-readable output and sort the results to identify major disk consumers. This is useful after df shows that a filesystem is nearly full. Once large directories are identified, administrators should determine whether the data is required before deleting or moving anything, especially on production systems.