LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-27-2010, 09:29 AM   #1
abrarpasha.syed
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Rep: Reputation: 0
xclock Error: Can't open display: - after upgrading to openSSH 5.2p1


I have got two servers apssvrX and apssvrZ on OEL. Both were built by the same team using their standard build scripts.

Having received the servers I had installed Oracle (ODI) product on it successfully.

Then as a part of requirement and as per Oracle support's advise, I had upgraded the ssh version on apssvrX server from OpenSSH_4.3p2 To OpenSSH_5.2p1, so that, I can implement the chroot jailing.


As per Oracle advise, I had downloaded the 3 RPMs from "_http://layer1.rack911.com/openssh/rhel5/x86_64/" to run them on my first server i.e., apssvrX and then configured the sshd services following the below steps:
****************************
****************************
a) Modify /etc/ssh/sshd_config to comment the below line:
# ------------
#Subsystem sftp /usr/libexec/openssh/sftp-server
# ------------
b) Add below lines:
# ----------------------------
Subsystem sftp internal-sftp
Match Group sftponly
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
# -----------------------------
Then lastly, Restart sshd services complete the configuration
# /etc/init.d/sshd restart
****************************
****************************
apssvrX server current details are as below:
apssvrX$ uname -a
Linux apssvrX 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

apssvrX$ ssh -V
OpenSSH_5.2p1, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008


My problems started from this point onwards. I want to install another Oracle product using OUI, but when I try to execute xclock using the Exceed HummingBird tool on apssvrX server then it fails with the error - (xclock) Error: Can't open display:

I tried the DISPLAY variable setup as well but to no use.

Whereas I can successfully execute the xclock on apssvrZ and OUI as well. Its config details are as below:
apssvrZ$ uname -a
Linux apssvrZ 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

apssvrZ$ ssh -V
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
 
Old 12-27-2010, 10:04 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Code:
X11Forwarding no
You disabled X forwarding, so of course X forwarding doesn't work. Change that "no" to "yes", restart SSHD, and try again.
 
Old 12-28-2010, 02:36 AM   #3
abrarpasha.syed
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Sorry I didn't mention it in my first post. I had already tried the "X11Forwarding Yes" by commenting out the sftp jailing configuration, restarted the sshd and tried to login yet no luck.

Below is the sshd_config of the server where I am facing the xclock issue:

[root@apssvrX]# cat /etc/ssh/sshd_config
# $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

#Port 22
Protocol 2
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin without-password
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication mechanism.
# Depending on your PAM configuration, this may bypass the setting of
# PasswordAuthentication, PermitEmptyPasswords, and
# "PermitRootLogin without-password". If you just want the PAM account and
# session checks to run without PAM authentication, then enable this but set
# ChallengeResponseAuthentication=no
#UsePAM no
UsePAM yes

# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL
AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server

## Commented the sftp jailing configuration - troubleshooting xclock
## ----------------------------
##Subsystem sftp internal-sftp
##Match Group sftponly
## ChrootDirectory %h
## X11Forwarding no
## AllowTcpForwarding no
## ForceCommand internal-sftp
 
Old 01-03-2011, 07:55 AM   #4
abrarpasha.syed
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Original Poster
Rep: Reputation: 0
With deadlines nearing to complete the testing, I finally had to revert the SSH package from 5.2p1 to 4.3p2. And guess what, once it moved back to OpenSSH_4.3p2, I could execute the xclock.

I think i can now say that, the X Windows/OUI doesnot work on OEL5u3 which has OpenSSH_5.2p1.

Thanks to all who tried to advise on this thread.

I will post another thread to know, the SSH version that will help me implement SFTP chroot jailing on OEL5u3.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Error: Can't open display" for xclock or gvim on kubuntu root shell konsole 1.6.6 TsanChung Linux - General 3 05-12-2012 01:48 AM
[SOLVED] xclock Error: Can't open display: <unknown ip>:0.0 fareast87 Red Hat 4 12-30-2010 10:51 AM
cannot display xclock Kitana AIX 5 04-07-2008 08:03 AM
After ssh'ing to self machine, unable to display xclock??? Passions Linux - Software 4 02-25-2008 04:12 PM
upgrading to openssh 3.5 cuss Linux - Security 8 12-12-2002 11:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration