Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So, here I am. There is a program that I need to use, on a machine I cannot ssh to directly..I can ssh to another machine, from where I can access that other machine, and run the program (in text mode) over ssh over ssh.
But, I'd need to get it X-forwarded (the GUI would be in this case far better than text). The first machine where I ssh to does X-forwarding ok, and I get all kinds of X-stuff over the ssh. And the other machine does X-forwarding, or at least it ought to do, but it seems it only forwards to the first machine, and not to my machine..
Is it possible to get the X-forwarding work from the 2nd machine via the 1st machine to my own machine? Or does it simply "die" on the 1st machine that's between me and the program. Damn. That sounded complex..
Also, could it have something to do with this that I only seem to get the X-forwarding work if I start ssh with root privileges (which is really not what I'd like to do)?
P.s. I can't ssh to the other machine directly because the connections are restricted to the "inner" network only, and only one machine is able to take (only certain) connections from the outside world..
no, it doesn't work..even with the -Y option. I only get
xset: unable to open display ""
xset: unable to open display ""
xset: unable to open display ""
Can't open display
and that's it..and the X11 forwarding is enabled in both of the machines as far as I know. From the first machine (the one that's between me and the program) I can run things like xclock and they do appear in my own desktop, but anything started from the 2nd machine where the program I need is, only gives me those xset: -lines...
I've set in my ssh settings X11 forwarding (both trusted and the other one) enabled, and it works (I can run xclock from the 1st machine), but only if I sudo ssh. When I have a connection to the other machine, I simply run the command I need ("xclock" command works) without any special options..
I tried ssh -X a moment ago, no luck :/ I really wonder what is going on, since I checked again, and X11Forwarding is enabled on both of the machines, but something happens between the 1st and the 2nd machine since the forwarding works from the 1st machine, but not from the 2nd..
I only wonder what could happen between the machines..
When you ssh to the second machine, check the value of the DISPLAY variable. It should be something like ":10.0" or "11:0" but I'm guessing that it isn't defined.
for some reason doing ssh -X in both of the machines (my own and the one between me and the 2nd machine) caused the program to run. Nice. Still I thought the ssh_config files were ok on every machine, so that the -X wouldn't be needed..anyway, not supposing anything and just using that -X did the trick I haven't found out yet why I have to use that -X on the 2nd machine too, since the configs say X11 forwarding is enabled..
well, now I learnt not to trust simple config files before trying command line options first. Thanks for everybody for you assistance..
Enabling X11 doesn't necessarily mean that you want to use it.
There is a difference between the server config that enables (aka "allows" the forwarding of X11 connections and the client that actually "asks" to get an X11 connection over the SSH connection (this is the -X option).
If the client can ask for X11 connections by default in his config, then you should have the same X11 settings for SSH on both your machine and "machine1" to make it work, I suppose.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.