• 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. Audit rules to log reboot command executions in CentOS/RHEL
  2. Interview Questions : Linux Package Manager (RPM)
  3. 5 Useful Command Examples to Monitor User Activity under Linux
  4. How to Run DNS and FTP services in a chroot Jail
  5. The ultimate Linux interview questions : swap
  6. How to automate sftp file transfers using expect utility
  7. CentOS / RHEL : How to find UUID of a device or filesystem
  8. How to Disable “alt+ctrl+Del” Key Combination causing reboot in CentOS/RHEL 4,5
  9. CentOS / RHEL 6 : How to rebuild Initial Ramdisk Image
  10. How to Move Swap From Disk Partition to LVM Volume in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • What are /dev/zero and /dev/null files in Linux
  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright