• 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

Unable to Run X Applications Through SSH in Linux

by admin

The Problem

The user is unable to run X applications through SSH on a CentOS/RHEL system. The following message is displayed:

# xclock
Error: Can't open display:

The Solution

1. X11 forwarding is disabled on SSH login unless “-X” option is specified:

# ssh -X user@address

2. It may have been disabled in “/etc/ssh/sshd_config” with the below setting:

# vi /etc/ssh/sshd_config
...
X11Forwarding no
...

3. Please make sure X11 forwarding is enabled in “/etc/ssh/sshd_config”:

# vi /etc/ssh/sshd_config
...
X11Forwarding yes
...

Then, use the “-X” option while logging in.

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to make CentOS/RHEL 7 FIPS 140-2 compliant
  2. whereis: command not found
  3. firejail: command not found
  4. mkfs.btrfs: command not found
  5. bmon: command not found
  6. balooctl: command not found
  7. How to Install and configure telnet in RHEL / CentOS 5,6
  8. grub-install Command Options
  9. gpg: command not found
  10. debchange Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • qsub Command Examples in Linux
  • qsub: command not found
  • qrcp Command Examples in Linux
  • qmrestore Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright