You are not logged in.

#1 2009-05-01 15:10:21

virusso80
Member
From: Italy
Registered: 2007-03-09
Posts: 325

[SOLVED] ssh and freenx (?)

Hi all,
I'm sorry for my trivial question. I have two pc1 and pc2 and I installed the freenx server on pc2. On pc1 one I installed the client. The problem is that after finishing configuring the server (according the wiki page) I'm not able to connect through ssh from pc1 to pc2 anymore.

I checked also hosts.allow and hosts.deny, but no changes. Before it was working. I restarted sshd demon  on both PCs. What could be the problem?

Thanks in advance

Last edited by virusso80 (2009-05-02 16:27:24)

Offline

#2 2009-05-01 15:54:06

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: [SOLVED] ssh and freenx (?)

You need to give more info:

Was it connection refused, timeout during authentication, authenticated then timeout?

Offline

#3 2009-05-01 16:27:05

virusso80
Member
From: Italy
Registered: 2007-03-09
Posts: 325

Re: [SOLVED] ssh and freenx (?)

I'm sorry, the output message is
ssh: connect to host 192.168.0.3 port 22: Connection refused

I tried also telnet
telnet 192.168.0.3 22
Trying 192.168.0.3...
telnet: Unable to connect to remote host: Connection refused

What else would be useful to check?

Offline

#4 2009-05-01 19:26:10

virusso80
Member
From: Italy
Registered: 2007-03-09
Posts: 325

Re: [SOLVED] ssh and freenx (?)

can the problem derive from freenx? I'm thinking that because before installation it was working (I installed the server through ssh)

Offline

#5 2009-05-02 00:31:24

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: [SOLVED] ssh and freenx (?)

AFAIK you only need to run sshd on pc2.

Check out the rules of iptables, there's guides on it all over, including in the wiki. Start with an `iptables -L` and read through, its not really very hard to understand. Freenx may have done something to your iptables rules.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#6 2009-05-02 02:03:20

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: [SOLVED] ssh and freenx (?)

Connection refused means that the computer with freenx server does not allow an ssh connection from your other computer. Nothing to do with freenx. I would suspect that your hosts.deny has the ALL: ALL: DENY line. Comment that out and try to connect again. The other possibility is that your ssh might not be set up properly. Or as ngoonee suggested, you might have a firewall set up that disallows connections. Freenx does not alter iptables.

*Edit* I just read carefully your last post: you can ssh previously but now you cannot. That is what you need to solve. You need to think back as to what you did that might cause this. Freenx by itself does not change anything. At most you should get an authentication fail message to involve freenx.

Last edited by stryder (2009-05-02 02:13:31)

Offline

#7 2009-05-02 11:55:18

virusso80
Member
From: Italy
Registered: 2007-03-09
Posts: 325

Re: [SOLVED] ssh and freenx (?)

stryder wrote:

Connection refused means that the computer with freenx server does not allow an ssh connection from your other computer. Nothing to do with freenx. I would suspect that your hosts.deny has the ALL: ALL: DENY line. Comment that out and try to connect again. The other possibility is that your ssh might not be set up properly. Or as ngoonee suggested, you might have a firewall set up that disallows connections. Freenx does not alter iptables.

*Edit* I just read carefully your last post: you can ssh previously but now you cannot. That is what you need to solve. You need to think back as to what you did that might cause this. Freenx by itself does not change anything. At most you should get an authentication fail message to involve freenx.

Files you're talking are the following:

#
# /etc/hosts.allow
#
sshd: ALL
# End of file

#
# /etc/hosts.deny
#

#ALL: ALL: DENY

# End of file

I never set any firewall, iptable is not installed sad

During freenx installation I just followed the wiki. When I tried to connect through the nxclient I got connection refused, then I realized that there's some problem with ssh. I restarted the demon more than once, but i don't know what's going on! I can't understand why it doesn't work.

any suggestion?

Offline

#8 2009-05-02 15:08:03

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: [SOLVED] ssh and freenx (?)

Well, a glance at the freenx wiki shows that the only time you changed something in ssh is in adding

ListenAddress 127.0.0.1

I had a look at my sshd_config and saw that I have the following:

ListenAddress 192.168.0.1
ListenAddress 127.0.0.1

the first being the ip address of my network card that connects to the rest of my local network. Or you can use the default

ListenAddress 0.0.0.0

which listens everywhere, I think. You might still want to add the 127.0.0.1 as a separate line. No harm, I'm sure.

I think if sshd is *only* listening at 127.0.0.1 no outside computer will be able to connect. Remember to restart sshd if you change the config. If this doesn't work, I'm out of ideas. :-) All the best.

Offline

#9 2009-05-02 16:22:59

virusso80
Member
From: Italy
Registered: 2007-03-09
Posts: 325

Re: [SOLVED] ssh and freenx (?)

stryder wrote:

Well, a glance at the freenx wiki shows that the only time you changed something in ssh is in adding

ListenAddress 127.0.0.1

I had a look at my sshd_config and saw that I have the following:

ListenAddress 192.168.0.1
ListenAddress 127.0.0.1

the first being the ip address of my network card that connects to the rest of my local network. Or you can use the default

ListenAddress 0.0.0.0

which listens everywhere, I think. You might still want to add the 127.0.0.1 as a separate line. No harm, I'm sure.

I think if sshd is *only* listening at 127.0.0.1 no outside computer will be able to connect. Remember to restart sshd if you change the config. If this doesn't work, I'm out of ideas. :-) All the best.

GREAT!
i had the default address! changing it to 192.168.0.3 it works!!

Could you explain why?

Thanks a lot!

Offline

#10 2009-05-02 16:33:49

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: [SOLVED] ssh and freenx (?)

Great! Glad we could solve the mystery. :-)

Why 0.0.0.0 didn't work? Or why 127.0.0.1 didn't work? Anyway you probably will have to wait for one of the gurus to explain this. Don't have a clue.

Enjoy your freenx. :-)

Offline

#11 2009-05-02 16:37:56

virusso80
Member
From: Italy
Registered: 2007-03-09
Posts: 325

Re: [SOLVED] ssh and freenx (?)

my sshd_config had:
ListenAddress 0.0.0.0
ListenAddress 127.0.0.1

putting the nec ip in place of 0.0.0.0 it works! very weird!

thanks

Offline

#12 2009-05-03 00:35:11

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: [SOLVED] ssh and freenx (?)

That is weird. I must have been lucky because I had changed mine only because I didn't want ssh listening on the internet. :-) I wonder if just 0.0.0.0 without 127.0.0.1 would work. Perhaps a specific cancels out the general.

Last edited by stryder (2009-05-03 00:36:43)

Offline

#13 2009-05-05 07:54:55

lefallen
Member
From: Melbourne, Australia
Registered: 2006-07-06
Posts: 36
Website

Re: [SOLVED] ssh and freenx (?)

stryder wrote:

Why 0.0.0.0 didn't work? Or why 127.0.0.1 didn't work?

According to the man page for sshd_config:

Multiple ListenAddress options are permitted.

However I tested this myself.  If you have only 1 network connection, configured as 192.168.0.2, to listen on both addresses, this will work:

ListenAddress 127.0.0.1
ListenAddress 192.168.0.2

As will this (which will actually listen on ALL local addresses - though in this scenario we only have the two above):

ListenAddress 0.0.0.0

The above use of 0.0.0.0 will ONLY work if NOT used with any other addresses.  This makes some sense as 0.0.0.0 is ALL so anything else would be useless anyway but the man page doesn't say this and can therefore cause some confusion (as above).  In other words, this will NOT work (it will only listen on 192.168.0.2):

ListenAddress 0.0.0.0
ListenAddress 192.168.0.2

Last edited by lefallen (2009-05-05 07:55:37)


JABBER: krayon -A-T- chat.qdnx.org
E-MAIL: archlinuxforums -A-T- quadronyx.org
WEB: http://www.qdnx.org/krayon/
~o~

Offline

#14 2009-05-05 08:18:42

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: [SOLVED] ssh and freenx (?)

Interestingly I had a little free time today and decided to test this myself too and yes, I can corroborate lefallen's findings. I also tested if "ListenAddress 0.0.0.0" would enable freenx and yes, it does, contrary to the advice in the freenx wiki.

Offline

#15 2009-05-05 09:10:04

sjovan
Member
Registered: 2009-04-24
Posts: 23

Re: [SOLVED] ssh and freenx (?)

Informed the wiki about this

Offline

#16 2009-10-22 08:20:21

matze
Member
From: Germany
Registered: 2008-10-29
Posts: 8

Re: [SOLVED] ssh and freenx (?)

had to add ListenAddress 192.168.2.2 too

Offline

Board footer

Powered by FluxBB