• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Enable X11 Forwarding on CentOS/RHEL 5,6,7

by admin

To enable X11 Forwarding on a server client edit the file “/etc/ssh/ssh_config” and on ssh server edit the file “/etc/ssh/sshd_config” and perform the following respective configuration changes.

For CentOS/RHEL 5,6

X11 Forwarding

Uncomment the line “# ForwardX11” and Change “ForwardX11 no” to “ForwardX11 yes”

ForwardX11 yes

Trusted X11 Forwarding

Uncomment the line “# ForwardX11Trusted” and Change “ForwardX11Trusted no” to “ForwardX11Trusted yes”

# If this option is set to yes then remote X11 clients will have full access
# to the original X11 display. As virtually no X11 client supports the untrusted
# mode correctly we set this to yes.
ForwardX11Trusted yes

3. After every change restart the sshd service or reboot the system.

# service sshd restart

Fro CentOS/RHEL 7

X11 Forwarding

1. Uncomment the following lines:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no

2. Start and enable the sshd service

# systemctl start sshd.service
# systemctl enable sshd.service
NOTE: X11 forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the user’s X11 authorization database) can access the local X11 display through the forwarded connection. An attacker may then be able to perform activities such as keystroke monitoring if the ForwardX11Trusted option is also enabled.

Filed Under: CentOS/RHEL 5, CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. dart: The tool for managing Dart projects
  2. “WARNING: Duplicate VG name [vgname]” – error while running LVM commands
  3. compsize Command Examples in Linux
  4. “git reflog” Command Examples
  5. vdir: command not found
  6. How to Configure NFS Services (server-side) to Run on Static Ports as an Alternative CentOS/RHEL 5 and 6
  7. flashrom: command not found
  8. CentOS / RHEL : Converting an Existing Root Filesystem to LVM Partition
  9. diff: command not found
  10. mandb: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • “glab issue” Command Examples
  • “glab auth” Command Examples
  • “glab alias” Command Examples
  • gixy Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright