X Window through SSH through RDC

Where Penguins and Daemons chill together in the warmth of the Sun.

Moderators: SecretSquirrel, notfred

X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 7:35 am

Alright I have a weird problem
I have an AIX box in our lab (not physically accessable) that due to subnetting can only be accessed via SSH.. through a WS2k8 'jump server' on both subnets via windows RDC. X window doesn't seem to be working, apparently due to the two layers of seperation

Regardless of what I have $DISPLAY set to, it can't open display, even when trying to xhost +.

I was told abstractly to "install xming it'll sort it all out" on the windows server but that hasn't helped at all.

Any helpful stepping stones in the right direction?
My Dreamcast PC thread
Main Rig: FX-6100 / Radeon 6950 / Velociraptor HD because old school rotations
pikaporeon
Graphmaster Gerbil
 
Posts: 1312
Joined: Mon Nov 19, 2007 4:42 pm
Location: Mississauga, ON, Canada.

Re: X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 7:41 am

Don't futz with the DISPLAY variable at all, try to ssh all the way through and it should set the DISPLAY variable automagically to the correct thing. You may need to add the "-Y" option to your ssh command, although I thought that was the default these days.

I'm not quite sure what you mean by the WS2k8 server with RDC in the middle. Your connection needs to be ssh all the way to have any chance of success, including ssh into one box and then ssh from there on to another box.
notfred
Grand Gerbil Poohbah
 
Posts: 3716
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 8:48 am

notfred wrote:Don't futz with the DISPLAY variable at all, try to ssh all the way through and it should set the DISPLAY variable automagically to the correct thing. You may need to add the "-Y" option to your ssh command, although I thought that was the default these days.

I'm not quite sure what you mean by the WS2k8 server with RDC in the middle. Your connection needs to be ssh all the way to have any chance of success, including ssh into one box and then ssh from there on to another box.

The Windows Server 2008 server I need to get on the same subnet does not have any form of ssh configured outside of me running putty to get onto the server I actually need to work with.
My Dreamcast PC thread
Main Rig: FX-6100 / Radeon 6950 / Velociraptor HD because old school rotations
pikaporeon
Graphmaster Gerbil
 
Posts: 1312
Joined: Mon Nov 19, 2007 4:42 pm
Location: Mississauga, ON, Canada.

Re: X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 9:18 am

You are going to need to get some form of ssh server on that Windows box, then you ssh to that Windows box and then ssh again from there to the AIX box.
notfred
Grand Gerbil Poohbah
 
Posts: 3716
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 9:27 am

Failing that, you can use psexec to "telnet" (not really) into the Windows server[1], then use a command-line SSH client installed on the Windows server to get into the remote AIX box.

This may be sub-optimal; I have no idea if psexec encrypts its connexions or not.

Cygwin has an sshd you could use if this isn't feasible, you just need to read the documentation and it'll set you right.

[1] "psexec \\servername cmd" will get you in, assuming your workstation is a Windows machine.
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3131
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 10:14 am

Where do you have Xming installed? you need to install Xming on the W2k8 server.

I'd go this route:

- Install Xming
- Install Cygwin (add mintty just to have a nice console)
- Fire mintty and run:

export DISPLAY=localhost:0

- Fire xming
- SSH into your server with -Y and -C options
- Start your graphical app
fr500
Gerbil
 
Posts: 19
Joined: Thu Jun 25, 2009 11:23 am

Re: X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 10:17 am

I use that everyday...If it works you might append

export DISPLAY=localhost:0

in .bashrc so you don't have to run it everytime

Also a better solution would be to add an static route on you PC to the AIX server's network via the W2K8 server. You'd need to enable routing in the 2k8 box so I don't know it that's feasible but that would allow you to access AIX server from your PC directly removing the RDP from the equation
fr500
Gerbil
 
Posts: 19
Joined: Thu Jun 25, 2009 11:23 am

Re: X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 10:31 am

I'll give that a shot. I'm worried the jump server might be too locked down for that though

Out of curiousity, any reason why I can't just get the X windows to pop up on the jump server? like whats the technical limitation im running into?
My Dreamcast PC thread
Main Rig: FX-6100 / Radeon 6950 / Velociraptor HD because old school rotations
pikaporeon
Graphmaster Gerbil
 
Posts: 1312
Joined: Mon Nov 19, 2007 4:42 pm
Location: Mississauga, ON, Canada.

Re: X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 11:53 am

pikaporeon wrote:Out of curiousity, any reason why I can't just get the X windows to pop up on the jump server? like whats the technical limitation im running into?


Windows doesn't have an X Server installed by default.

Here's what happening.
1) ssh session is established with X11 forwarding enabled.
2) GUI program is started.
3) GUI program starts sending GUI data over the ssh connection to be received by the X server on the local computer.
4) X Server renders the GUI elements with all the processing happening on the server.

You don't have an X Server, so step 4 never happens, and possibly, step 3 doesn't happen if you don't specify X11 forwarding in PuTTY.

Try MobaXterm. You don't have to install anything, and the X Windows environment is already setup. You should be able to issue "ssh username@server" then "xterm &" with everything just working. I haven't used MobaXterm in a while, since I got a dedicated Linux box at work, but that's the way it used to work, if I remember correctly. If that doesn't work, you may need to issue "ssh -X username@server" to get the tunneling working.

MobaXterm
http://mobaxterm.mobatek.net/
Flatland_Spider
Gerbil Elite
 
Posts: 816
Joined: Mon Sep 13, 2004 8:33 pm
Location: The 918/539

Re: X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 12:02 pm

pikaporeon wrote:I'll give that a shot. I'm worried the jump server might be too locked down for that though

Out of curiousity, any reason why I can't just get the X windows to pop up on the jump server? like whats the technical limitation im running into?



The first instructions I gave you should work on the jump server.

Flatland is right, Windows doesn't have an Xserver, that's what's Xming is going to do.
fr500
Gerbil
 
Posts: 19
Joined: Thu Jun 25, 2009 11:23 am

Re: X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 12:13 pm

I'd step back from the technical problem and look at the bigger picture. Ask your network folks for a direct route. If there is a legitimate policy reason why you can't have a direct route, then working around it could get you fired. If there's no policy reason, but they won't do it anyway, write a memo to your boss explaining why you need this to do your job and asking him to deal with the appropriate manager to get this resolved.

Adding a route between two known addresses to the Windows server shouldn't be a big deal, unless, of course, it violates some policy.
zzatz
Gerbil
 
Posts: 10
Joined: Fri Apr 07, 2006 11:11 pm

Re: X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 12:35 pm

zzatz wrote:I'd step back from the technical problem and look at the bigger picture. Ask your network folks for a direct route. If there is a legitimate policy reason why you can't have a direct route, then working around it could get you fired. If there's no policy reason, but they won't do it anyway, write a memo to your boss explaining why you need this to do your job and asking him to deal with the appropriate manager to get this resolved.

Adding a route between two known addresses to the Windows server shouldn't be a big deal, unless, of course, it violates some policy.
Flatland_Spider
Gerbil Elite
 
Posts: 816
Joined: Mon Sep 13, 2004 8:33 pm
Location: The 918/539

Re: X Window through SSH through RDC

Postposted on Wed Jun 15, 2011 1:07 pm

derp.

The problem was sshd on the aix server had X11 forwarding disabled <_<;

Thanks a lot for your help anyway guys.
My Dreamcast PC thread
Main Rig: FX-6100 / Radeon 6950 / Velociraptor HD because old school rotations
pikaporeon
Graphmaster Gerbil
 
Posts: 1312
Joined: Mon Nov 19, 2007 4:42 pm
Location: Mississauga, ON, Canada.


Return to Linux, Unix, and Assorted Madness

Who is online

Users browsing this forum: No registered users and 1 guest