Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
what command should I be using to connect to an X11 server listening on port 6000?
You gotta tell us more. Too much is left to guessing. It depends on what you want to happen. If, e.g., you wanted a clock to show up, the command would be "xclock", e.g., "xclock -display server:0"
Again, please tell us what you're trying to achieve.
The link will not be tunneled in ssh so it's unencrypted.
If the X server does security, setting the good cookie should be enough.
As root for example:
xauth merge ~user_that_started_X/.Xauthority
then root has the security cookie of user_that_started_X and is allowed to connect to X.
Distribution: Ubuntu 5.10 Breezy, Fedora Core 6, Mac OS X 10.4.8
Posts: 16
Original Poster
Rep:
I have two units currently networked together, both running X11. The target unit is using Red Hat Linux Shrike and Xfce. The local unit is running windows cygwin/x.
If the Red Hat box has x11 listening on port 6000, then what command should I be entering on the windows machine in order to spawn an xterm running on the Red Hat machine, but displayed on my windows x11?
x11 on cygwin/x (windows) is standard, doesn't seem any different than my macosx or other linux/unix x windows.
I have two units currently networked together, both running X11. The target unit is using Red Hat Linux Shrike and Xfce. The local unit is running windows cygwin/x.
If the Red Hat box has x11 listening on port 6000,
The Xserver is where your monitor,keyboard and mouse are. The X server and xfce won't be used if you want to display locally then.
Quote:
then what command should I be entering on the windows machine in order to spawn an xterm running on the Red Hat machine, but displayed on my windows x11?
ssh is a way to connect to your redhat. It also allows you to do X11 tunneling in ssh.
From cygwin, start your xserver and run
ssh -X user@shrike
xterm
If everything is well configured, you should see the xterm on your cygwin
Distribution: Ubuntu 5.10 Breezy, Fedora Core 6, Mac OS X 10.4.8
Posts: 16
Original Poster
Rep:
What if I have SSH, Telnet, Rlogin etc all disabled on the Red Hat machine?
I'm a little familiar with ssh -Y and -X options, but I'm curious then if ssh is the standard for using X11 forwarding, then why does the Red Hat machine have X11 listening on port 6000 at all then?
What if I have SSH, Telnet, Rlogin etc all disabled on the Red Hat machine?
Simple.. remotely, you can't execute any command on the RH.
Quote:
I'm a little familiar with ssh -Y and -X options, but I'm curious then if ssh is the standard for using X11 forwarding, then why does the Red Hat machine have X11 listening on port 6000 at all then?
In your case, the X client is xterm, and it connects through the network to the X server (which is the machine hosting the screen,keyboard,.. hardware resources, in your case your local machine)
Compared to windows, linux comes with 2 layers that can be seperated. The client can connect to another server. On windows, roughly speaking, when you start a GUI, it displays locally. On linux, when you start a GUI (an X client), it can be displayed on another monitor (X server).
The X server on RH is used for displaying on the RH monitor.
For your scenario, you can connect remotely to RH , stop the xserver (like telinit 3 as root), this will stop any graphic display on the RH.
Then start an X client specifying an other X server DISPLAY. Via the X11 network-protocol, it will displaw on the X server.
So you only need to open the X server (6000+x) and the client has to connect to it. The x11 network-protocol is not encrypted and commands can be injected by an attacker or snooping is very easy ( a few lines is enough)
One way of securing it is to put the X11 protocol in the same connection as the one ssh uses. It's a trick of redirecting sockets and the concept of tunnel.
But you can also connect with SSH (without the -X and -Y) and set manually the DISPLAY environment variable. Then your xterm on RH will connect to local:6000 without passing trhough the tunnel.
There is no advantage of doing this..
I have two units currently networked together, both running X11. The target unit is using Red Hat Linux Shrike and Xfce. The local unit is running windows cygwin/x.
[and you want] to spawn an xterm running on the Red Hat machine, but displayed on my windows x11?
That makes your Windows box the X server. The X client, xterm, will run on the RedHat machine. It doesn't matter at all whether the RedHat has an X11 running, or if it's listening on any port. Assuming the windows box is listening on :6000, you need to execute a command like "xterm -display windowshost:0" on the Red Hat machine. Ssh is one way to achieve that from the windows box. (Rsh, rlogin and telnet are too, but they're insecure and it's a good idea to disable them.)
Quote:
What if I have SSH, Telnet, Rlogin etc all disabled on the Red Hat machine?
That makes it impossible to achieve your goal.
I understand you don't want to use ssh, but IMO it would be the easiest let it tunnel X11 -- ssh sets DISPLAY for you and handles authentication, so you don't have to deal with the magic cookie issue either.
What have you tried so far? What results (e.g., error messages) did you get?
Distribution: Ubuntu 5.10 Breezy, Fedora Core 6, Mac OS X 10.4.8
Posts: 16
Original Poster
Rep:
I can successfully display the xclient (RH) on the xserver (windows) using SSH no problem.
I was basically just curious if there was a way to connect to the RH box through the open port for x11.
You see, I was logged into my RH box using SSH and playing with the sshd_config and added "MaxAuthTries $value" and then restarted the machine, and got an error on boot that the ssh server could not be started because of the invalid option of maxauthtries.
At this point I figured, no problem, I'll just ssh in and change the sshd_config back and then update it to the latest version of ssh etc. Unfortunately, this is the only remote access service I have on the RH box thats even running, yet alone allowed access through the firewall.
The next step would be to stop being lazy and actually physically connect a keyboard and mouse to this machine except I don't have the original keyboard/mouse I used to install RH and I gave away the last PS/2 connection keyboard/mouse I had. For some reason RH shrike doesn't seem to be autodetecting any of USB keyboards/mice.
Since X11 port 6000 seems to completely different than I originally imagined then, I guess I'll just DL the most hardware compatible live cd I can find and try editing the config file on the RH partition directly.
Thanks for all the feedback and time though everyone. Greatly appreciated.
I hope your boot order is set to check the DVD/cd first. If it is not, how are you going to change the bios settings? Most motherboards I use will not let you use a usb keyboard alter bios settings. This is a pretty handy safety thing for public computers.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.