- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SSH forwarding X connection from 3rd host
Operating System - HP-UX
1824976
Members
3916
Online
109678
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2003 08:38 AM
тАО09-04-2003 08:38 AM
SSH forwarding X connection from 3rd host
Hi, I have my ssh setup in such a way that I can run a session and forward X for applications that run locally on the server to which my ssh connection is established.
What I would like to do is to have other servers use the fake display setup by sshd so that they can display to my laptop through the already established tunnel.
SSH client ---> Server A -------> Server B
SSH telnet
<-------
X to A:10.0
By setting X11UseLocalhost to no, I was expecting to be able to do this.
Unfortunately, when I start an app such as hpterm on server B with DISPLAY=ServerA:10.0, I get the following error:
X connection to ServerA:10.0 broken (explicit kill or server shutdown)
On ServerA, when running sshd with -d flag, I get the following upon running my app on ServerB:
debug1: channel 2: new [X11 connection from ServerB port 49180]
debug1: channel 2: open confirm rwindow 30000 rmax 16384
debug1: channel 2: rcvd close
debug1: channel 2: output open -> drain
debug1: channel 2: close_read
debug1: channel 2: input open -> closed
debug1: channel 2: obuf empty
debug1: channel 2: close_write
debug1: channel 2: output drain -> closed
debug1: channel 2: send close
debug1: channel 2: is dead
debug1: channel 2: garbage collecting
debug1: channel_free: channel 2: X11 connection from ServerB port 49180, nchannels 3
Any idea why this is happening and any suggestion to make this work?
What I would like to do is to have other servers use the fake display setup by sshd so that they can display to my laptop through the already established tunnel.
SSH client ---> Server A -------> Server B
SSH telnet
<-------
X to A:10.0
By setting X11UseLocalhost to no, I was expecting to be able to do this.
Unfortunately, when I start an app such as hpterm on server B with DISPLAY=ServerA:10.0, I get the following error:
X connection to ServerA:10.0 broken (explicit kill or server shutdown)
On ServerA, when running sshd with -d flag, I get the following upon running my app on ServerB:
debug1: channel 2: new [X11 connection from ServerB port 49180]
debug1: channel 2: open confirm rwindow 30000 rmax 16384
debug1: channel 2: rcvd close
debug1: channel 2: output open -> drain
debug1: channel 2: close_read
debug1: channel 2: input open -> closed
debug1: channel 2: obuf empty
debug1: channel 2: close_write
debug1: channel 2: output drain -> closed
debug1: channel 2: send close
debug1: channel 2: is dead
debug1: channel 2: garbage collecting
debug1: channel_free: channel 2: X11 connection from ServerB port 49180, nchannels 3
Any idea why this is happening and any suggestion to make this work?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2003 08:40 AM
тАО09-04-2003 08:40 AM
Re: SSH forwarding X connection from 3rd host
You must forward the autentication agent, like this
ssh -t user@server ssh -A -g -t user@server2
I use similar settings to forward port for connecting to oracle behind firewalls.
Massimo
ssh -t user@server ssh -A -g -t user@server2
I use similar settings to forward port for connecting to oracle behind firewalls.
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2003 01:15 PM
тАО09-04-2003 01:15 PM
Re: SSH forwarding X connection from 3rd host
Here's what I found out about why this is happening:
When creating the fake local display on ServerA, sshd assigns a magic cookie to it. This cookie must be used by all clients to this fake X server. The cookie can be view by using "xauth list" in you ssh session to ServerA.
How to get it to work:
Add the cookie to the Xauthority file on ServerB so that it will use this cookie when connecting to the fake X server on ServerA. You can do this by using "xauth add" and using the cookie information retrieve from the "xauth list" done on ServerA.
Once this was done, applications running on ServerB were able to use the fake X server on ServerA and be forwarded for display on my laptop.
Alex
When creating the fake local display on ServerA, sshd assigns a magic cookie to it. This cookie must be used by all clients to this fake X server. The cookie can be view by using "xauth list" in you ssh session to ServerA.
How to get it to work:
Add the cookie to the Xauthority file on ServerB so that it will use this cookie when connecting to the fake X server on ServerA. You can do this by using "xauth add" and using the cookie information retrieve from the "xauth list" done on ServerA.
Once this was done, applications running on ServerB were able to use the fake X server on ServerA and be forwarded for display on my laptop.
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2003 05:33 AM
тАО09-05-2003 05:33 AM
Re: SSH forwarding X connection from 3rd host
Hi !
I have been using a similar configuration with OpenSSH running on
(Linux) -> (HPUX-A) -> (HPUX-B)
and had no problems to run X apps on HPUX-B using the XServer on Linux.
Then I moved to a similar setup, with the middle host running the commercial SSH software, and I couldn't get HPUX-B to use the XServer on Linux.
I guess Massimo's reply would have helped me
.... grant him the due points.
-rg-
I have been using a similar configuration with OpenSSH running on
(Linux) -> (HPUX-A) -> (HPUX-B)
and had no problems to run X apps on HPUX-B using the XServer on Linux.
Then I moved to a similar setup, with the middle host running the commercial SSH software, and I couldn't get HPUX-B to use the XServer on Linux.
I guess Massimo's reply would have helped me
.... grant him the due points.
-rg-
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP