ssh problem, please help

TheSick

Junior Member
Oct 13, 2002
6
0
0
I'm having a problem starting X sessions through ssh. I'm new at this whole ssh thing as well, so please don't flame me for it.

The problem I'm having is that I can't start X sessions at all. I can log in to the remote server with ssh, but when I try to start the X program in question, it simply doesn't. The command line I use to log in is: ssh -X -l myloginname servername (of course, myloginname and servername are the appropriate names). Shouldn't that work?

I am running Redhat Linux 7.3 (dual-booted with WinXP). My ISP is AT&T Broadband. I am behind a Linksys BEFSR11 Cable/DSL router, which is connected to an 8-port 10/100 switch. Any ideas?
 

Rias

Member
Aug 23, 2002
101
0
0
On the remote server you're trying to ssh into and want to run your X-capable programs from, is "X11Forwarding yes" set in the sshd_config file?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
What errors are you getting and you realize it willl be slow over a cable connection?
 

TheSick

Junior Member
Oct 13, 2002
6
0
0
I'm not exactly sure how the server I'm trying to ssh into is configured.

My situation is, that I am a student. The machine I'm trying to ssh into is a Solaris machine that's owned by the University. Most of the computers on campus are Win98 machines, and they can connect to the same machine I'm trying to connect to, but they're using Hummingbird Exceed to do it. I have seen others use Exceed to get into the comptuer in question using AT&T Broadband connections. For me, speed is not an issue; I just want the ability to get in there and do my work. (around 1.4MBit average down, 235Kbit average up is my bandwidth ... is that bad?)

On this note: Rias, I think "X11Forwarding yes" is set in the ssh config file, since other computers can use Exceed and ssh to get in.

The errors I am getting are exactly the same as if I were to telnet into the remote system and attempt to start an X application. The app I'm trying to start is VisualWorks Smalltalk 2.5. I know Smalltalk is pretty much a dead language, but I'm in an object-oriented design course right now, and Smalltalk is probably the best way to learn object-oriented design, since every damn thing is an object. I have this line in my .tcshrc:

alias vw '/usr/local/visual/bin/visualworks /usr/local/visual/image/visual.im'

This command works; I can use it when I am logged into the system on campus, and it starts up the VisualWorks development environment. VisualWorks 2.5 is no longer available; 7.0 is out, but I want to avoid compatibility issues, so I am trying to develop in 2.5. Here's the error, word-for-word, that I get when I type vw at the shell, whether using ssh or telnet:

VisualWorks (R) 2.5.2 Jan 13 1997 (thapi) (fs)
VisualWorks (R) 2.5.2 Jan 13 1997 (thapi) (fs) Fatal error: Unable to connect to X11 server.

Again, this is using the ssh command line that I posted in the first post of this thread: ssh -X -l myloginname servername (replacements for login name and server name made where appropriate).
 

IcemanJer

Diamond Member
Mar 9, 2001
4,307
0
0
could it be because of your router? Most commercial cable/DSL routers will block certain ports and stuff, and it's probably blocking the port required to use remote X. I can't tell you off-hand what's the port(s) remote X uses, but maybe someone could, and see if you could open that port up on your router.

Something else you might want to try is to connect your computer directly to the cable modem and not through the router.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: IcemanJer
could it be because of your router? Most commercial cable/DSL routers will block certain ports and stuff, and it's probably blocking the port required to use remote X. I can't tell you off-hand what's the port(s) remote X uses, but maybe someone could, and see if you could open that port up on your router.

Something else you might want to try is to connect your computer directly to the cable modem and not through the router.

It should be tunneled through SSH, so it should be going out and coming in on port 22.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Remote X sessions can fill up a 10mbit pipe pretty well. But we can try getting this to wory anyhow (could be fun) :)

1. Check /etc/ssh/ssh_config
Look for ForwardX11, it should be set to yes.

2. When you ssh into the server, try echo $DISPLAY. If it does not return your ip address and a display (ie 10.10.10.10:1) $DISPLAY is not getting set correctly. You can try setting it (export DISPLAY=10.10.10.10:10 for most Bourne like shells I think), but Im not sure that will work properly (kind of remember something in a helpfile or FAQ somewhere saying setting your own display wont work, but its been a while).
 

TheSick

Junior Member
Oct 13, 2002
6
0
0
I tried this:

xhost + thehostnameinquestion

then I used the same ssh command line I used before, and once I logged in I did this:

setenv DISPLAY my_ip:0.0

I tried it with my NAT-ed IP and the IP my ISP provided with me. No luck on either one.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: TheSick
I tried this:

xhost + thehostnameinquestion

then I used the same ssh command line I used before, and once I logged in I did this:

setenv DISPLAY my_ip:0.0

I tried it with my NAT-ed IP and the IP my ISP provided with me. No luck on either one.

Did you check to see if it set itself already? Its important. :p

:0.0 would be the local machine probably, so it probably wouldnt work.
 

TheSick

Junior Member
Oct 13, 2002
6
0
0
There's no setenv DISPLAY in my .tcshrc file, so I don't think it set itself. I got it to work in a somewhat unconventional way.

I run an IIS Web server, with the Terminal Services Web client installed. So, I FTP'd the trial version of Exceed onto that server and installed it there using tsweb. From there, I was able to start Exceed and run the programs in question.

Unfortunately, the trial version of Exceed stops working after 30 days, so I'll probably have to go and buy the $25 Student Edition that expires on August 15, 2003. Meh.
 

ScottMac

Moderator<br>Networking<br>Elite member
Mar 19, 2001
5,471
2
0
Since your are tunneling, the X program you're using must allow sessions from 127.0.0.1 (the apparent address of the SSH tunneled session).

Check your security setting to make sure 127.0.0.1 is allowed (you fer sher have to do this in X-Win32).

Good Luck

Scott
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: TheSick
There's no setenv DISPLAY in my .tcshrc file, so I don't think it set itself. I got it to work in a somewhat unconventional way.

I run an IIS Web server, with the Terminal Services Web client installed. So, I FTP'd the trial version of Exceed onto that server and installed it there using tsweb. From there, I was able to start Exceed and run the programs in question.

Unfortunately, the trial version of Exceed stops working after 30 days, so I'll probably have to go and buy the $25 Student Edition that expires on August 15, 2003. Meh.

Check to see if $DISPLAY gets set when you ssh in.