Click to See Complete Forum and Search --> : sshd Networking Problem (remote)


talon1177
08-23-2002, 07:36 PM
Hi,

Just spent the afternoon searching for answers to a problem I'm having.

Basically, I'm running a Windows XP system networked to a RedHat 7.3 PC. The XP box is set up as the gateway and shares internet to the Linux box.

Internet works fine to the linux box, I hardly had to do anything as it set it all up for me (clever thing ;) ), but I do not seem to be able to run access any services from outside the network.

Currently I'm focusing on getting sshd to work. So far I can access it locally on 192.168.0.93 through PuTTy from the XP box, but not "externally" through my router IP. It just tells be "Connection Refused" as though something is blocking it. Running a portscanner from www.glocksoft.com also tells me that port 22 is not visible to the internet. (I did try telnet as well, but that ended up with the same outcome so I removed it.)

I have mapped port 22 to 192.168.0.93 on the XP box. (XP Box has the network address 192.168.0.1)

I'm almost certain it's something I've not quite got right on the Linux box side, I'm just not sure what.

If someone can could help me, or point to a relevant thread that I missed, I would be very grateful :)

baldguy
08-23-2002, 10:34 PM
try
netstat -an | grep LISTEN
and see if you are listening on port 22
you should get a result like:

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN

which is the protocol followed by the recieve and send queues and then the listening address (0.0.0.0:22) meaning listening on all interfaces and remote addresses (0.0.0.0:*) meaning any address can connect from any port and LISTEN which means it is waiting for an incoming connection.

You can also try sshing into your localhost address from your linux box, then try on your other interfaces.

ssh localhost or
ssh 192.168.0.93

Radar
08-23-2002, 10:44 PM
You have the ssh service runing, obviously, since you can use putty from XP to Linux.

Seems you have not forwarded port 22 on the XP box to port 22 on the Linux box properly.

Make sure that you first allow connections to port 22 on the XP box, then do the forward.

talon1177
08-24-2002, 10:00 AM
Originally posted by Radar
You have the ssh service runing, obviously, since you can use putty from XP to Linux.

Seems you have not forwarded port 22 on the XP box to port 22 on the Linux box properly.

Make sure that you first allow connections to port 22 on the XP box, then do the forward.

Yes, I agree. I'm not sure I have forwarded it properly, though I'm assuming that by mapping Port 22 in XP to the Linux box would be sufficient.

I'm not entirely certain how to allow connections to port 22 on the XP box.

I tried a little web based portscanner (http://scan.sygatetech.com/prequickscan.html) and this tells me that Port 22 is open. If I kill sshd, then the same scan shows me that Port 22 is blocked. So it appears to be there.

Done some more research and reading today, maybe I missed something out of the sshd_config file?