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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. ispell Command Examples in Linux
  2. ncview: command not found
  3. ping Command Examples in Linux
  4. How to Integrate CentOS/RHEL system into an AD Domain with LDAP/Kerberos/SSSD
  5. openvpn3 Command Examples
  6. How to Schedule Jobs with ‘at’ command under Linux
  7. grub-mkconfig Command Examples in Linux
  8. mount: command not found
  9. flashrom Command Examples in Linux
  10. How to Use iptables instead of firewalld on CentOS/RHEL 7 and 8

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright