Confused with setting nxserver

Dear all,
I am trying to make my nxserver to allow remote connections.

I am using opensuse 13.1 and I am using

NoMachine - Version 4.6.4

It is not clear to me if nxserver can be places on the exactly same port as my ssh is currently listening to.

My ssh server is currently listening to port 5902 and I can access my ssh server from my ssh client from home through a tunnel.
For that I needed to add a tunnel at my client and port forwarding works correctly from my client and I can get access to that ssh computer as I said.

'The problem now seems to be the no machine client and I can see at my server computer that I can access my 5902 port everytime I try to connect my nomachine client at port 5902.

My problem though is where my nxserver should be listening at. Should be the same port as my ssh?

If yes, when I am trying to connect to port 5902: (Client tries to connect to remote host with the port being 5902 and the protocol ssh).
I am getting the message
“Running No Machine sessions over a SSH connection is not supported on this server. Do you want to switch your connection to using the NX protocol?” and when I press continue I get a Error 22 : Invalid argument

I think it is clear that the problem is not probably at my connection but how my server is configured.

my nomachine server error logs (nxerror.log)
look like

16918 16918 07:12:42 298.278 Socket: WARNING! Error is 99 'Cannot assign requested address'.
Info: Handler started with pid 17004 on Tue Sep 29 07:13:10 2015.
Info: Handling connection from 127.0.0.1 port 41345 on Tue Sep 29 07:13:10 2015.
'.004 17012 07:13:10 993.367 DaemonGreeter/DaemonGreeter: ERROR! Invalid client identification 'SSH-2.0-OpenSSH_6.2
'.ror: Invalid client identification 'SSH-2.0-OpenSSH_6.2
Warning: Connection from 127.0.0.1 port 41345 failed on Tue Sep 29 07:13:10 2015.
Warning: Connection error is 22, 'Invalid argument'.



Can someone help me sort things out?

I would like to thank you for your reply
Regards
Alex

I know nothing about nxserver, but one thing is clear: you can only have one deamon listening to a specific port at the time.

Thus either stop the ssh deamon when your nxserver want to listen to that port, or configure your nxserver to listen to a different (free!) port and tell your client(s) to connect to that port (and open your firewall for it).

Thanks. Was not though that in the past nxserver was running at the same port with the sshd?

Not at the same time. That is impossible. You can not bend the hard facts.

IMHO the “well known” port for SSH is 22.
You talk about 5902. That is not the well known port of ssh. It is even outside the range of system ports (0-1024).

I found https://www.nomachine.com/AR01L00770 (I assume you have studied that), but 5902 is nowhere mentioned. hey talk about 4000 plus. But again, I am no user of the product and you should know better why you think that it uses 5902 and that SSH (or specialy your SSHd configuration) uses 5902 also.

Thanks for the answer.
For me it looks like that nxserver has to be at the same port with the sshd

Regards
Alex

I can only repeat:

  • I know almost nothing about NX, thus I do not know what port it normaly uses to listen on, nor if it is working together with the SSH deamon to share connections or whatever.
  • Only one program at the time (mostly called deamon) can register with the kernel for listening on a TCP or UDP port. I have no idea if that in a NX environment should be: a) the (an) SSH deamon that recocnises that the connection is an NX one and then calls NX, or b) an NX deamon that recocnises that SSH is wanted and acts accordiingly.

And the registered port for SSH:

ssh                22/tcp       # The Secure Shell (SSH) Protocol  [RFC4251]
ssh                22/udp       # The Secure Shell (SSH) Protocol  [RFC4251]

And about port 443 mentioned in that askubuntu thread:

https              443/tcp      # http protocol over TLS/SSL  [Kipp_E_B_Hickman]
https              443/udp      # http protocol over TLS/SSL  [Kipp_E_B_Hickman]

And I do not realy understand what Secure HTTP has to do with the subject here, but that may derive from my lack of NX knowledge.

In any case such a regitered “well Known” port means that normaly

  1. a server running that protocol will by default listen to that port (when not configured different);
  2. a client will by default try to connect to that port when not told otherwise.

(The last case I can illustrate with telnet. when you “telnet to a system” the telnet client will seek connection to port 23 when called

telnet asystem

but you can try another port with

telnet asystem 666

)

All my posting above is based on general knowledge about TCP/UDP ports. Not on NX facts.

Are you using free edition of NoMachine? https://www.nomachine.com/AR11K00752

/usr/NX/bin/nxserver --version
NoMachine - Version 4.6.4




/usr/NX/bin/nxclient --version
NXCLIENT - Version 4.6.4


Copyright (C) 2002, 2015 NoMachine.
See http://www.nomachine.com/ for more information.


/usr/NX/bin/nxnode --version
NoMachine Node - Version 4.6.4


what other information should I provide to find out?

Hi
The later versions on Nx differ from 3.X version with regard to connecting…
https://www.nomachine.com/DT09K00056

This document should help?
https://www.nomachine.com/DT01L00064

Hi malcom,
so did I remember correctly that the nx server at some point of time was using the ssh port?

Thanks for the provided link and that is the one I have used for setting up. I have also googled a lot to find a solution to my problem.

That problem here looks very similar to this since I see similar error messages in the log files.

https://www.nomachine.com/forums/topic/nxserver-cant-start-on-opensuse-13-2

I also asked here
https://www.nomachine.com/forums/topic/cant-start-opensuse-13-1
but no answer so far.
Regards
Alex

This looks like free edition indeed. I think other versions are called “Enterprise Server” etc. like “NoMachine Enterprise Server Evaluation - Version 4.0.319”.

Hi Alex
Yes it use to use ssh, have you checked the right ports are open on the firewall, or is it turned off?

In your server hosts file, localhost is on the loopback address?

so you imply that I have to remove it and install another version?

Firewall is currently off. Firewall is not the problem since I can see with tcpdump the request coming in.

that is my /etc/hosts file since I am not sure what you think I should check

127.0.0.1       localhost
 # special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback
fe00::0         ipv6-localnet
ff00::0         ipv6-mcastprefixff02::1         ipv6-allnodes
ff02::2         ipv6-allrouters
ff02::3         ipv6-allhosts
127.0.0.1       MyPc.IamHidingThisPart


The link I posted describes at least one workaround.

Thanks for the answer.
I guess you mean the:

https://www.nomachine.com/AR11K00752

If I am not wrong my problem is that the nxserver does not start… right? If my nxserver does not start what is the purpose of nx client to connect to?
Regards
Alex

Why do you think so? It starts enough to answer that it refuses to use this connection method.

Thanks. I am too tired now to read again the links but I promise to do my search during that direction as you commented.

Thanks

Dear all,
I was able to fix the problem as that.
Uninstalled nxserver 4.something I was using. I installed the latest version and everything worked out of the box. I should have done some mistake in some of my log files and I could not find it I guess.

Regards
Alex