Operating System - HP-UX
1834508 Members
2784 Online
110068 Solutions
New Discussion

Re: X windows and Secure Shell

 
SOLVED
Go to solution
Igor Sovin
Super Advisor

X windows and Secure Shell

Hi !
Tell me please how can I make X windows ( CDE) to work with SSH?
Is it possible?
5 REPLIES 5
Hoefnix
Honored Contributor

Re: X windows and Secure Shell

Hi,

I don't know if this is what you mean but I'll give it a try:
Be sure you have a local xserver running (for example Linux) Then open a local terminal and give others acces to you X. Do: xhost +

Then open a ssh session to the remote system:
ssh -X
On the remote host set your display:
export DISPLAY=:0.0 (or :1.0 for the second xserver if you are running 2 on the local system)

Test if you can run xclock. (should appear on your local system)
Then I think you can start on the remote the dtlogin: /usr/dt/bin/dtlogin


HTH,

Peter

generic_1
Respected Contributor

Re: X windows and Secure Shell

Once you get the setting figured out you could modify your login profile to automatically setup your environment when you connect. This is handy for things like default paths too.
Robert True
Frequent Advisor
Solution

Re: X windows and Secure Shell

Yes, it is possible, but not as discribed by Peter (Not sure he understood its with ssh). You need to allow X-forwarding and will have to go into the ssh config file and allow it. I will try to find my settings and post them, can't even remember the config file this am - too much blood in the cafine system!

Rt.
Robert True
Frequent Advisor

Re: X windows and Secure Shell

OK, Found it. If you are root, go into the file /etc/opt/ssh/sshd_config (or where ever ssh is installed).

On the systems you want to X11 FROM (remote):

Near the bottom of the file uncomment: X11Forwarding yes (if says no, chg to yes)

X11UseLocalhost no


On the systems you want to X11 TO (local):

Near the bottom of the file uncomment: X11Forwarding yes (if says no, chg to yes)

X11UseLocalhost yes (if says no, chg to yes)

Restart the sshd deamons on both systems.

DO NOT set display or DISPLAY in your env on the systems you want to display the CDE stuff FROM, it will not work correctly. SSH will establish its own display channel using the local systems offset by 10 (default) ie: unix:10.0, but you don't have to worry about it, sshd handles it in the background. You do not have to do an 'xhost+ remotesys', that is part of the reason for ssh.

It is possible to su - another user on the remote system and send the cde display back to the local system using the X11Forwarding, if you don't mind opening a small security hole. However get your X11Forwarding working first.

Rt.
Steven E. Protter
Exalted Contributor

Re: X windows and Secure Shell

In general, depending on your chosen client, add in software is required.

We use Exceed and the nice folks at Exceed after getting a $500/user license fee want another $280 for the module that uses ssh.

Its worth it because you can really lock down the servers once you use ssh instead of the r protocols.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com