LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problems getting remote ssh/X connection working (https://www.linuxquestions.org/questions/linux-newbie-8/problems-getting-remote-ssh-x-connection-working-151355/)

fabs 02-27-2004 07:52 PM

problems getting remote ssh/X connection working
 
i'm having trouble getting a remote X connection going with ssh.

I can connect fine to the machine (an HPUX server) with
Code:

$ x -auth -l username remotehost
window manager loads and everything.

but i can't get it to work over a secure connection :( whatever i try and do i get the message about could not connect to display.

the main jist of what i think i want to do is
Code:

$ ssh -X -l username remotehost
but i can't get it to work. init is at runlevel 3, and insecure connections work fine, but i don't know what to try now, and all the documentation i've read doesn't seem to help more than saying to set the -X tag.

Thanks!

fabs

Demonbane 02-27-2004 08:16 PM

check and see if these settings are set in /etc/ssh/sshd_config
Code:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

ssh in again, check the DISPLAY variable, it should be localhost:10.0, launch an X app, if it works then you're tunneling through ssh.

fabs 02-28-2004 09:32 AM

uh oh.....

Code:

$ ssh -l username remotehost
/etc/ssh/ssh_config: line 40: Bad configuration option: X11UseDisplayOffset
/etc/ssh/ssh_config: line 41: Bad configuration option: X11UseLocalhost
/etc/ssh/ssh_config: terminating, 2 bad configuration options


fabs 02-29-2004 02:57 PM

uh oh....mass stupidity.....DisplayOffset, not UseDisplayOffset....oops :P
well, have (kinda) solved things by using
Code:

$ ssh -XAL user hostname
however, i'm running into problems because my use of the system is (primarily) based around starting an environment with the start command. How do i get this to work??? It complains about not recognising window names if i run it in init runlevel 5, and i get the (all too) familiar 'cannot connect to display' message if i go into runlevel 3 first.

Thanks,
fabs

Demonbane 02-29-2004 10:25 PM

I was actually talking about "sshd_config"(note the 'd') which is the config file for the daemon on your ssh server, not the client.
You have to start an X server on the localhost first, then you ssh in to launch you window manager etc.

fabs 03-01-2004 09:02 AM

ah, ok. next newbish question......how do i start X without loading the window manager? i.e. in such a way that "start env_name" will work? many thanks :)

Demonbane 03-01-2004 10:24 PM

run "X" or "XFree"


All times are GMT -5. The time now is 09:50 PM.