CompTIA Linux+ (XK0-005) — Question 258
After connecting to a remote host via SSH, an administrator attempts to run an application but receives the following error:
[user@worksration ~]$ ssh admin@srv1
Last login: Tue Mar 29 18:03:34 2022
[admin@srv1 ~] $ /usr/local/bin/config_manager
Error: cannot open display:
[admin@srv1 ~] $
Which of the following should the administrator do to resolve this error?
Answer options
- A. Disconnect from the SSH session and reconnect using the ssh -x command.
- B. Add Options X11 to the /home/admin/ .ssh/authorized_keys file.
- C. Open port 6000 on the workstation and restart the firewalld service.
- D. Enable X11 forwarding in /etc/ssh/ssh_config and restart the server.
Correct answer: D
Explanation
The correct answer is D because enabling X11 forwarding in the SSH configuration allows graphical applications to be displayed on the local machine. The other options do not effectively resolve the issue: A does not enable X11 forwarding, B is not the correct file to modify, and C addresses firewall settings but does not directly fix the display issue.