I haven’t had much luck with ssh X11 forwarding on my server. At the suggestion of another forum user, I am trying to set up FreeNX. Everything installed okay, I created a user, added a password, but I can’t actually start a session. I enter my username and password with the nxclient, it authenticates fine, and then sits for a while “Downloading session information” and then times out. Choosing “Details” gives me the following message:
NX> 203 NXSSH running with pid: 30235
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: myIPAddress on port: mySSHPort
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
HELLO NXSERVER - Version 1.5.0-70 OS (GPL, using backend: 2.1.0)
NX> 105 hello NXCLIENT - Version 1.5.0
NX> 134 Accepted protocol: 1.5.0
NX> 105 SET SHELL_MODE SHELL
NX> 105 SET AUTH_MODE PASSWORD
NX> 105 login
NX> 101 User: zak
NX> 102 Password:
NX> 103 Welcome to: remoteServer user: zak
NX> 105 listsession --user="zak" --status="suspended,running" --geometry="1600x1200x24+render" --type="unix-gnome"
NX> 127 Sessions list of user 'zak' for reconnect:
Display Type Session ID Options Depth Screen Status Session Name
------- ---------------- -------------------------------- -------- ----- -------------- ----------- ------------------------------
NX> 148 Server capacity: not reached for user: zak
NX> 105 startsession --link="lan" --backingstore="1" --encryption="1" --cache="16M" --images="64M" --media="1" --mediahelper="esd" --imagecompressionmethod="3" --imagecompressionlevel="-1" --render="1" --session="mySession" --type="unix-gnome" --geometry="1024x768+288+198" --kbtype="pc102/us" --screeninfo="1024x768x24+render"
NX> 280 Exiting on signal: 15
I don’t even see any error in that output, except the last line. What is going wrong here? SSH is open in the firewall; I am not sure what else to check.
I really need some way to run some graphical apps on the remote machine, and a VNC session is too slow.
Well, the rpms from nomachine don’t seen to install at all. There are no errors during installation (either via the rpm command or yast2 (with the packages in my own local repo), but there are no nx* commands available, and rpm -q reports that the rpm are not installed (even though they are shown as installed in yast!). I am having a really bad day.
Hi
Yes, if you could remove the opensuse rpm’s and install the ones from
nomachine. Did you also reset the ssh_config file to original and
restart sshd?
–
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 1 day 23:05, 3 users, load average: 0.29, 0.19, 0.14
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.80
I uninstalled openSUSE’s freeNX packages and installed the rpms from nomachine. Something went wrong, though, because like I said before, rpm reports the packages as uninstalled, even though I had just "rpm -ivh"ed them. I then put nomachines rpms’ in my own local repo, and installed them again via yast2. Still no dice. I haven’t reverted my ssh files, though. But that shouldn’t stop the rpms from installing, and why are they not generating an error message?
It is installed, but rather than putting the binaries in /usr/bin, they were installed in /etc/init.d as init scripts, like you showed. Not only that, the server was already running!
Same error. I couldn’t find a .nx directory on the remote machine, but I deleted ~/.nx/ on the local one. Also, I reverted to my original ssh config files. Everything is default currently. The website made it sound so easy, this is really confusing!
Hi
It sure is… I have it running on openSUSE, SLED and Solaris… no
issues.
So on the remote machine, you have all three files and you can ssh in
ok? Can you look it the ~/.ssh directory and see if there is anything
funny in there.
On you local machine you just need the nomachine nx client, ssh client
and it should connect…?
Else try removing the nx components again on both machines, also check
the /usr/NX and any ~/.nx directorys are removed and try again…
I always use rpm -Uhv when installing by hand.
–
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 2 days 1:13, 2 users, load average: 0.02, 0.10, 0.05
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.80
There is an authorized_keys2 file (I don’t know why it’s called that) that nxserver put there. I don’t know why it doesn’t use the authorized_keys file.
I think the problem might be I don’t have an nx user account. nxserver --userlist doesn’t show anything. But when I try to add a user with nxserver --useradd zak, I get the following error:
NX> 801 User: zak uses SSHD authentication.
NX> 900 Adding public key for user: zak to the authorized keys file.
NX> 716 Public key is already present in: /home/zak/.ssh/authorized_keys2.
NX> 900 Verifying public key authentication for NX user: zak.
NXSERVER - Version 3.2.0-16 - LFE
Mon Nov 3 20:38:56 2008 running as user: 'root' (uid: 0, pid: 16817) on 'li45-249'
Info: selected user 'zak' is authenticated (NXNodeExec)
Info: password for selected user is in 'unknown' mode (NXNodeExec)
Info: preferred auth method is '' (NXNodeExec)
Info: selected NX Node with host name '127.0.0.1', port '22' (NXNodeExec)
Info: selected su to access NX Node (NXNodeExec)
Info: nxssh command line is 'su zak -c /usr/NX/bin/nxnode' (NXNodeExec)
Info: nxssh child pid is: 16833 (NXNodeExec)
Info: received data in out channel from NX Node: 'NX> 1000 NXNODE - Version 3.2.0-13
' (NXNodeExec)
Info: received message 'CONNECTED' from NX Node (NXNodeExec)
Info: sent request for service 'setkey' to NX Node (NXNodeExec)
Info: no parameter to send to NX Node (NXNodeExec)
Info: received data in out channel from NX Node: 'NX> 716 Public key is already present in: /home/zak/.ssh/authorized_keys2.
NX> 1001 Bye.
' (NXNodeExec)
Info: received message 'BYE' from NX Node (NXNodeExec)
Info: closing nxssh's in, out, err FDs (flagfinished is: 1) (NXNodeExec)
Info: connection to NX Node finished correctly (NXNodeExec)
Info: selected user 'zak' is not authenticated no password available (NXNodeExec)
Info: preferred auth method is 'publickey' (NXNodeExec)
Info: selected NX Node with host name '127.0.0.1', port '22' (NXNodeExec)
Info: selected publickey method to login NX Node (NXNodeExec)
Info: nxssh command line is '/usr/NX/bin/nxssh -nxservermode -l zak 127.0.0.1 -p 22 -x -2 -i /usr/NX/etc/keys/node.localhost.id_dsa -o 'PubkeyAuthentication yes' -o 'RSAAuthentication yes' -o 'RhostsAuthentication no' -o 'PasswordAuthentication no' -o 'RhostsRSAAuthentication no' -o 'StrictHostKeyChecking no' /usr/NX/bin/nxnode' (NXNodeExec)
Info: nxssh child pid is: 16848 (NXNodeExec)
Error: reached timeout of 60s. Operation in NX Node aborted. (NXNodeExec)
Error: no 'CONNECTED' message from NX Node (NXNodeExec)
NX> 595 ERROR: A fatal error occurred in NX Server.
NX> 595 ERROR: The exception id is: D10A2F57. To get detailed information about
NX> 595 ERROR: the error search for the string D10A2F57 in the system log
NX> 595 ERROR: file (usually '/var/log/messages').
NX> 500 ERROR: Last operation failed.
The /var/log/messages didn’t seem to make things clearer. I bunch a failed system calls mostly.
By the way, both machines are running up-to-date openSUSE 11.0.
Tomorrow I will try reinstalling, though I have already done that a few times!
Are you sure I should delete the authorized_keys2? I read an article on Linux.com on nomachine’s FreeNX and it said that NX creates an authorized_keys2 file that must be referenced in /etc/ssh/sshd_config. But the online docs didn’t mention it at all.
Hi
I had to do that on my solaris systems, but not linux ones…
If you uninstall the rpms, have a look in the authorized_keys2 file you
will see it’s generated by nx. Just move it up to your home directory
if your concerned
Re-install and you will see a new keys file generated when trying to
connect.
On the client your connecting from delete the ~/.nx directory and
delete the entries in ~/.ssh that reference the remote machine eg
known_hosts and authorized-keys.
Then create a new config and try connecting.
Basically you need to remove any references on both machines relating
to any ssh/nx keys that were generated as when you re-install the are
all regenerated for that install.
–
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 2 days 17:44, 1 user, load average: 0.14, 0.18, 0.35
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.80
I deleted the .nx/ directory on the local machine, reinstalled openSUSE on the remote server (it’s a brand new Linode VM with nothing on it, so reinstalling was actually easier than trying to track the various file I had messed with). With everything back to normal (and no firewall just yet) I reinstalled NX from nomachine on both the local and remote sides. I have no .ssh/* on either (zak) or the remote account (zak). I haven’t touched any config files, added a user (with nxserver), or anything. I set up a GNOME session with the NX Session Wizard, entered the correct username and password, and tried connecting. It timed out again during authentication with the following message:
NX> 203 NXSSH running with pid: 10301
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: 72.14.182.249 on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
HELLO NXSERVER - Version 3.2.0-16 - LFE
NX> 105 Hello NXCLIENT - Version 3.2.0
NX> 134 Accepted protocol: 3.2.0
NX> 105 Set shell_mode: shell
NX> 105 Set auth_mode: password
NX> 105 Login
NX> 101 User: zak
NX> 102 Password: *******
NX> 500 ERROR: Operation timeout in communication with SSH server
NX> 999 Bye.
NX> 280 Exiting on signal: 15
This is from /var/log/messages:
sshd[4669]: Accepted publickey for nx from 71.117.39.128 port 53400 ssh2
sshd[4671]: error: Failed to allocate internet-domain X11 display socket.
NXSERVER-3.2.0-16[4672]: ERROR: reached timeout of 20s while trying SSHd authentication for user 'zak', to '127.0.0.1', port '22' 'NXNssUserManager::auth'
NXSERVER-3.2.0-16[4672]: killing nxssh process '4699' with signal '9' 'NXNssUserManager::auth'
NXSERVER-3.2.0-16[4672]: ERROR: process with pid '4699' has died 'WaitProcess::waitProcess'
I don’t even see an error in this output. I am wondering if the tiemout is too short? But I don’t know where to set it/
I have a feeling that the problem is my short timeout (20s). I read that you need to change NodeResponseTimeout in /usr/NX/etc/server.cfg (NodeResponseTimeout = “60”). I did that, (and also set LoginGraceTime to 2m in sshd_config) and restarted sshd and nxserver. But it still times out after 20s (with the exact same error listed above). Where is the timeout being set to 20s?
Also, when you installed NX, did you do anything other than install the packages? The online docs made it sound like no post-install configuration is needed.
Okay, I’m getting somwhere. It turns out the bug report here:https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/136947 solved my earlier ssh -x problem and HALF my freeNX issue. Now the authentication goes through, but the session still fails with this message :
NXPROXY - Version 3.2.0
Copyright (C) 2001, 2007 NoMachine.
See http://www.nomachine.com/ for more information.
Info: Proxy running in client mode with pid '7836'.
Session: Starting session at 'Tue Nov 4 16:09:33 2008'.
Info: Connection with remote proxy completed.
Info: Using LAN link parameters 1536/24/1/0.
Info: Using pack method 'adaptive-9' with session 'rootless'.
Info: Using product 'LFE/None/LFEN/None'.
Info: Not using NX delta compression.
Info: Not using ZLIB data compression.
Info: Not using ZLIB stream compression.
Info: Not using a persistent cache.
Info: Forwarding X11 connections to display ':0.0'.
Info: Listening to font server connections on port '11002'.
Session: Session started at 'Tue Nov 4 16:09:33 2008'.
Info: Established X server connection.
Info: Using shared memory parameters 1/2048K.
Error: Connection with remote peer broken.
Error: Please check the state of your network and retry.
Session: Terminating session at 'Tue Nov 4 16:09:40 2008'.
Session: Session terminated at 'Tue Nov 4 16:09:40 2008'.
And this from /var/log/messages:
NXNODE-3.2.0-13[6097]: ERROR: Error when monitoring session: Could not open default font 'fixed' 'NXSessionMonitor::__setSessionStatus'
NXNODE-3.2.0-13[6097]: NXSessionMonitor: killing unexpected agent running with pid '6086' with signal '15' 'NXSessionMonitor::monitorStatus'
NXNODE-3.2.0-13[6097]: NXSessionMonitor: killing unexpected agent running with pid '6086' with signal '15' 'NXSessionMonitor::monitorStatus'
NXNODE-3.2.0-13[6097]: NXSessionMonitor: killing unexpected agent running with pid '6086' with signal '9' 'NXSessionMonitor::monitorStatus'
NXNODE-3.2.0-13[5997]: ERROR: Unexpected termination of nxagent because of signal: 9 Logger::log nxnode 3837
NXNODE-3.2.0-13[5997]: ERROR: run command: process: 6086 died because of signal: 9 Logger::log nxnode 3844
NXNODE-3.2.0-13[6097]: Directory '/home/zak/.nx/C-li45-249-1002-D08AC571981161CB985BFD7900A55F93' renamed into '/home/zak/.nx/F-C-li45-249-1002-D08AC571981161CB985BFD7900A55F93' for further investigation Logger::log nxnode 6215
NXNODE-3.2.0-13[5997]: Session 'unix-desktop' on port '1002' failed. Logger::log nxnode 6296
NXSERVER-3.2.0-16[6089]: ERROR: NXNodeExec: Cannot kill nxssh process: No such process 'NXNodeExec::exec'
NXSERVER-3.2.0-16[6089]: User 'zak' from '71.117.39.128' logged out. 'NXLogin::reset'
Getting closer, but not there yet. I would really really appreciate some hints!
Okay, it’s working fine now. Turns out that my slimmed down selection of KDE packages didn’t include some X fonts and etc; with all those installed (and my loopback interface up) it works like a charm! Thanks, malcolmlewis!
So to sum it up, I made sure there was no previous freeNX installation, deleted any existing /usr/NX/ directory as well as ~/.nx, installed the rpms from nomachine.com, made sure my loopback device was up (ifconfig lo up), installed some X libraries that I was missing (the default patterns “X Window System” and “Fonts” should be enough) and it works fine!. I can attribute my problems to my loopback interface not being properly configured at boot (I don’t have a clue why) and my lean selection of X related packages (as this is supposed to be a “server”).
If anyone could enlighten me as to how to label this thread as SOLVED I would appreciate it!