Bug 6727 - cannot connect to nxserver running on Mageia2 with default sshd configuration
Summary: cannot connect to nxserver running on Mageia2 with default sshd configuration
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-09 11:34 CEST by JeanClaude Garaud
Modified: 2013-08-29 12:51 CEST (History)
3 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description JeanClaude Garaud 2012-07-09 11:34:16 CEST
Description of problem:

I Cannot connect to nxserver running specifically on _Mageia2_ (32 or 64 bit versions) with a nxclient (running on Mageia1 or 2 or mandriva).
But I can connect  to the same version of nxserver running on _Mageia1_ (32 or 64 versions) from nxclient running on any linux distribution.

Files /etc/ssh/ssh_config on mageia1 and 2 are identical.
The only difference between files /etc/ssh/sshd_config on mageia1 and 2 is 
"UsePAM no" in Mageia1 and ""UsePAM ye"s in Mageia2. But setting "UsePAM no" in Mageia2 makes no difference.

Version-Release number of selected component (if applicable):
nx free edition for Linux downloaded from http://www.nomachine.com/select-package.php?os=linux&id=1

nxclient-3.5.0-7.i386.rpm
nxclient-3.5.0-7.x86_64.rpm
nxnode-3.5.0-9.i386.rpm
nxnode-3.5.0-9.x86_64
nxserver-3.5.0-11.i386.rpm
nxserver-3.5.0-11.x86_64.rpm

How reproducible: tested on 3 PC running Mageia2 installed from DVD or boot.iso CD 32 or 64 bits versions

Steps to Reproduce:
1.Install nx on client and server with
sudo urpmi nxclient-3.5.0-7.i386.rpm (or nxclient-3.5.0-7.x86_64.rpm)
sudo urpmi nxnode-3.5.0-9.i386.rpm (or nxnode-3.5.0-9.x86_64)
sudo urpmi nxserver-3.5.0-11.i386.rpm (or nxserver-3.5.0-11.x86_64.rpm)

2.Configure client connexion on server with
nxclient --wizard

3.Trying to connect from nxclient on _Mageia2_ you get a window with the following error message:
"The NX service is not available or the NX access was disabled on host 192.168.1.18"
Clicking "Detail" gives the following informations:
NX> 203 NXSSH running with pid: 27739
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
NX> 200 Connected to address: 192.168.1.18 on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
NX> 204 Authentication failed.

sshd is up. I can connect to 192.168.1.18 with my login and password or rsa keys.
I can connect to the nx server:
#  ssh -i /usr/NX/home/nx/.ssh/default.id_dsa.pub  nx@192.168.1.18
Enter passphrase for key '/usr/NX/home/nx/.ssh/default.id_dsa.pub':
but of course I don't know the passphrase.

Any idea ?
Comment 1 Manuel Hiebel 2012-07-09 16:02:41 CEST
oliver maybe you have an ideas ?

CC: (none) => oliver.bgr
Component: Release (media or process) => RPM Packages

Comment 2 Oliver Burger 2012-07-09 16:11:12 CEST
Those are nx upstream packages aren't they?

Which mga nx packages are installed?
Comment 3 JeanClaude Garaud 2012-07-10 12:20:45 CEST
As I wanted to try x2go the following nx packages have been installed too:
lib64nxX11_0 - Nx-X11 lib for NXâ Version : 3.5.0.12-1.mga2
nxagent - NX X server based on Xnestâ Version : 3.5.0.12-1.mga2
nxproxy Version : 3.5.0.12-1.mga2
but the impossibility to connect to a remote nx server remained
Comment 4 Oliver Burger 2012-07-10 13:11:34 CEST
I never used the nomachine nxserver and nxclient, no clue there.
Did you ask in nx dedicated fora? I'm sure they exist somewhere (without knowing where).
Comment 5 JeanClaude Garaud 2012-08-16 12:23:54 CEST
Solved !

In Mageia1 sshd accepted both files authorized_keys2 and authorized_keys.
In Mageia2 the problem is occurs from the following setting in /etc/ssh/sshd_config:
# The "default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile      .ssh/authorized_keys

To correct the problem, either comment the line
AuthorizedKeysFile      .ssh/authorized_keys
in /etc/ssh/sshd_config
or
ln ~/.ssh/authorized_keys ~/.ssh/authorized_keys2
Comment 6 JeanClaude Garaud 2012-08-16 12:33:06 CEST
Same problem and same solution with NoMachine 4 Preview.
Comment 7 Samuel Verschelde 2013-08-29 12:51:55 CEST
According to comment #5, this is not a bug, but a side-effect of secure default parameters in sshd's configuration. 
Does nxserver really need ~/.ssh/authorized_keys2? Why can't it use ~/.ssh/authorized_keys?

If it really can't, a good user-friendly move would be to add a readme.urpmi file to nxserver explaining that issue so that it is displayed to the user at installation time... But we don't provide nxserver in mageia, do we?

Closing then.

Status: NEW => RESOLVED
CC: (none) => stormi
Resolution: (none) => INVALID
Summary: Nomachine nxclient cannot connect to nxserver running on Mageia2 => cannot connect to nxserver running on Mageia2 with default sshd configuration


Note You need to log in before you can comment on or make changes to this bug.