Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just built my first linux box using CentOS dual boot to windows. I am up and running and things are working pretty well. I would like to be able connect remotely.
I have tried to get NoMachine working and I keep getting this error. I am totally frustrated.
NX> 203 NXSSH running with pid: 5984
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
ssh: connect to host 192.168.0.129 port 22: Connection refused
Things I have tried to fix it.
I am trying to connect from a Vista laptop connected wirelessly through my router. I have added a rule to allow port 22 traffic to the router.
I have checked to make sure my Linux box is listening on port 22.
I have tried changing the nx user manually through the command line.
I have copied the nx ssh key from Linux to Vista and imported it into the "NoMachine" client.
I have connected the Vista Laptop to the Desktop with a crossover cable and was able to ping Linux box, still got error from client
Can you have a look in /var/log/messages and post the info about SSH and/or NX? There may also be info in /var/log/secure or /var/log/syslog depending on your distro.
Can you have a look in /var/log/messages and post the info about SSH and/or NX? There may also be info in /var/log/secure or /var/log/syslog depending on your distro.
I am just getting up to speed on this Linux stuff, but I think this is what your asking for.
Messages Log
ssh.service.
Jan 24 03:24:05 localhost avahi-daemon[3097]: New relevant interface virbr0.IPv6 for mDNS.
Jan 24 03:24:05 localhost avahi-daemon[3097]: Joining mDNS multicast group on interface virbr0.IPv6 with address fe80::200:ff:fe00:0.
Jan 24 03:24:05 localhost avahi-daemon[3097]: New relevant interface virbr0.IPv4 for mDNS.
Jan 24 03:24:05 localhost avahi-daemon[3097]: Joining mDNS multicast group on interface virbr0.IPv4 with address 192.168.122.1.
Jan 24 03:24:05 localhost avahi-daemon[3097]: New relevant interface eth0.IPv6 for mDNS.
Jan 24 03:24:05 localhost avahi-daemon[3097]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::20e:a6ff:fe41:ed69.
Jan 24 03:24:05 localhost avahi-daemon[3097]: New relevant interface eth0.IPv4 for mDNS.
Jan 24 03:24:05 localhost avahi-daemon[3097]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.0.129.
Jan 24 03:24:05 localhost avahi-daemon[3097]: Network interface enumeration completed.
Jan 24 03:24:05 localhost avahi-daemon[3097]: Registering new address record for fe80::200:ff:fe00:0 on virbr0.
Jan 24 03:24:05 localhost avahi-daemon[3097]: Registering new address record for 192.168.122.1 on virbr0.
Jan 24 03:24:05 localhost avahi-daemon[3097]: Registering new address record for fe80::20e:a6ff:fe41:ed69 on eth0.
Jan 24 03:24:05 localhost avahi-daemon[3097]: Registering new address record for 192.168.0.129 on eth0.
Jan 24 03:24:05 localhost avahi-daemon[3097]: Registering HINFO record with values 'I686'/'LINUX'.
Jan 24 03:24:06 localhost avahi-daemon[3097]: Server startup complete. Host name is localhost.local. Local service cookie is 2143964125.
Jan 24 03:24:07 localhost avahi-daemon[3097]: Service "SFTP File Transfer on localhost" (/services/sftp-ssh.service) successfully established.
secure logs
Jan 24 19:16:36 localhost gdm[4226]: pam_unix(gdm:session): session closed for user root
Jan 24 19:16:49 localhost sshd[2885]: Received signal 15; terminating.
Jan 24 19:18:48 localhost sshd[2886]: Server listening on :: port 22.
Jan 24 19:18:48 localhost sshd[2886]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Jan 24 19:19:28 localhost gdm[4235]: pam_unix(gdm:session): session opened for user root by (uid=0)
Those last few lines are saying that when an ssh daemon attempted to start, it failed because another one was already listening on port 22. Does your SSH work properly at the moment?
The way I have mine set up, I run NX server and have it listen for connections on localhost. To connect to it, I set up an ssh tunnel from the remote PC (for example a windows PC at the office), and tell NX to connect to the ssh tunnel. Following are typical entries from my server logs:
Code:
Jan 25 16:00:13 fender sshd[6606]: Server listening on 0.0.0.0 port 22.
Jan 25 16:03:09 fender sshd[6717]: Accepted publickey for steve from 165.86.71.xx port 45970 ssh2
Jan 25 16:03:19 fender sshd[6744]: Accepted publickey for nx from 127.0.0.1 port 52165 ssh2
Jan 25 16:03:21 fender sshd[6777]: Accepted password for steve from 127.0.0.1 port 52166 ssh2
Jan 25 16:03:21 fender NXSERVER-3.0.0-74[6759]: User 'steve' logged in from '127.0.0.1'. 'NXLogin::set'
Jan 25 16:03:22 fender NXSERVER-3.0.0-74[6759]: Selected node host:localhost with port:22 'main::selectNode'
Jan 25 16:03:22 fender NXSERVER-3.0.0-74[6759]: Current selected node: localhost is in status: running 'main::selectNode'
Jan 25 16:03:22 fender NXSERVER-3.0.0-74[6759]: Selected session type: unix-desktop allowed in the profile of user: steve 'NXShell::Static'
Jan 25 16:03:23 fender sshd[6787]: Accepted publickey for steve from 127.0.0.1 port 52167 ssh2
Jan 25 16:03:26 fender NXSERVER-3.0.0-74[6759]: Session 'ZZZZZZ99D8D194B15CD85909A4B9C647' started by user 'steve'. 'NXShell::handler_session_start'
Jan 25 16:03:26 fender NXNODE-3.0.0-88[6794]: Using port '1105' on node 'fender' for session 'unix-desktop'. Logger::log nxnode 5823
Jan 25 16:03:26 fender NXNODE-3.0.0-88[6794]: Using host from available host list: '127.0.0.1'. Logger::log nxnode 5824
Jan 25 16:03:26 fender NXSERVER-3.0.0-74[6759]: User 'steve' from '127.0.0.1' logged out. 'NXLogin::reset'
Jan 25 16:04:18 fender NXNODE-3.0.0-88[6794]: Session 'unix-desktop' on port '1105' closed. Logger::log nxnode 6099
Jan 25 16:04:20 fender NXSERVER-3.0.0-74[6891]: session sessionId:ZZZZZZ99D8D194B15CD85909A4B9C647 finished 'NXShell::handler_session_start'
Jan 25 16:04:20 fender NXSERVER-3.0.0-74[6891]: Session 'ZZZZZZ99D8D194B15CD85909A4B9C647' closed by user 'steve'. 'NXShell::Static'
Can you grep your logs for similar entries and post them here please?
I am really new to Linux. I have been an MS Admin for years. So I am just learning how to get around. I will try and figure out how to use grep and get the info you asked for.
I do not know how to test if SSH is working. I did find a site that said the "error: Bind to port 22 on 0.0.0.0 failed: Address already in use." was because IPv6 and IPv4 are both enabled.
That's good news then - if SSH is working, then NX is next. At it's simplest, grep searches for a string in a file, so the following should do the job:
So just to make sure things were clean, I uninstalled this morning and reinstalled around Jan 25 11:04 log time. The Client still gets the same error. Here are several results using grep with different ARG's.
EDIT: Nothing really shows up in the logs after trying to execute the client from my Vista machine.
Thanks again for not giving up on this.
Code:
grep nx /var/log/messages >NX_Messages.log
Jan 24 12:43:46 localhost Installed: nx.i386 3.0.0-4.el5.centos
Jan 24 12:43:53 localhost Installed: freenx.i386 0.7.1.svn416-3.el5.centos
Jan 24 17:17:18 localhost Installed: nxclient.i386 3.1.0-2
Jan 24 17:17:47 localhost Installed: nxnode.i386 3.1.0-5
Jan 24 17:18:05 localhost Installed: nxserver.i386 3.1.0-4
Jan 25 10:44:26 localhost NXSERVER-3.1.0-4[7782]: ERROR: Initialization fail: can't open file '/usr/NX/etc/server.cfg: No such file or directory Logger::log nxserver 661
Jan 25 10:44:26 localhost NXSERVER-3.1.0-4[7782]: ERROR: No such file or directory. Please try to fix the problem by Logger::log nxserver 662
Jan 25 10:44:26 localhost NXSERVER-3.1.0-4[7782]: ERROR: running: /usr/NX/scripts/setup/nxserver --install Logger::log nxserver 663
Jan 25 10:44:27 localhost Erased: nxserver
Jan 25 10:44:32 localhost Erased: nxnode
Jan 25 10:44:36 localhost Erased: freenx
Jan 25 10:44:37 localhost Erased: nxclient
Jan 25 11:04:33 localhost Installed: nxclient.i386 3.1.0-2
Jan 25 11:05:12 localhost Installed: nxnode.i386 3.1.0-5
Jan 25 11:05:35 localhost Installed: nxserver.i386 3.1.0-4
grep NX /var/log/messages >>NX_Messages.log
Jan 24 03:23:49 localhost kernel: Using x86 segment limits to approximate NX protection
Jan 24 03:34:35 localhost kernel: Using x86 segment limits to approximate NX protection
Jan 24 12:16:14 localhost kernel: Using x86 segment limits to approximate NX protection
Jan 24 13:56:35 localhost kernel: Using x86 segment limits to approximate NX protection
Jan 24 19:18:43 localhost kernel: Using x86 segment limits to approximate NX protection
Jan 24 20:38:11 localhost kernel: Using x86 segment limits to approximate NX protection
Jan 25 10:44:26 localhost NXSERVER-3.1.0-4[7782]: ERROR: Initialization fail: can't open file '/usr/NX/etc/server.cfg: No such file or directory Logger::log nxserver 661
Jan 25 10:44:26 localhost NXSERVER-3.1.0-4[7782]: ERROR: No such file or directory. Please try to fix the problem by Logger::log nxserver 662
Jan 25 10:44:26 localhost NXSERVER-3.1.0-4[7782]: ERROR: running: /usr/NX/scripts/setup/nxserver --install Logger::log nxserver 663
Jan 25 10:50:39 localhost kernel: Using x86 segment limits to approximate NX protection
Jan 25 11:05:34 localhost NXSERVER-3.1.0-4[4951]: Cannot read from stdin: NX client disconnected before the 'bye' message: exiting cleanly 'NXShell::handleExitRequests'
Jan 25 11:10:48 localhost kernel: Using x86 segment limits to approximate NX protection
grep NXSERVER /var/log/messages >>NX_Messages.log
Jan 25 10:44:26 localhost NXSERVER-3.1.0-4[7782]: ERROR: Initialization fail: can't open file '/usr/NX/etc/server.cfg: No such file or directory Logger::log nxserver 661
Jan 25 10:44:26 localhost NXSERVER-3.1.0-4[7782]: ERROR: No such file or directory. Please try to fix the problem by Logger::log nxserver 662
Jan 25 10:44:26 localhost NXSERVER-3.1.0-4[7782]: ERROR: running: /usr/NX/scripts/setup/nxserver --install Logger::log nxserver 663
Jan 25 11:05:34 localhost NXSERVER-3.1.0-4[4951]: Cannot read from stdin: NX client disconnected before the 'bye' message: exiting cleanly 'NXShell::handleExitRequests'
The file permissions are the same as mine. I re-read your log messages and it looks like nxserver is being passed --install instead of --start Can you check that it's being passed the correct options at startup?
If it is, you should be able to run nxclient on the Linux box and create a local connection.
I don't know how to tell / where to look to see "it's being passed the correct options at startup". When I boot up I see it try to start and I see a message that says it's already running and then an "OK", but no error messages on the boot screen.
I ran it locally and it fired right up, but I got this error message.
Code:
Sound server informational message:
Error while initializing the sound driver:
device /dev/dsp can't be opened (Permision denied)
The sound server will continue, using the null output device.
The top menu bar says:
Code:
NX - webhut33@localhost.localdomain:1001 - test
EDIT:
Does that mean it is connecting on port 1001 locally instead of using port 22 and I am I correct in assuming it's not using ssh?
Not too bad. I'd have expected a line like the following somewhere in /etc/init.d/nxserver:
Code:
NODE_ROOT=/usr/NX
If it's not there, you can add it and try again.
The other files named like S*nxserver and K*nxserver are symlinks to the main file and control the starting and stopping of nxserver as run levels change. Unless you're manually changing run levels, don't worry about them.
Before I tell you how I got it working I'de like to thank you for all your help. I learned a lot just by working on this.
Now for the bad part. It ended up that Norton was blocking the client even though I had added a rule and had thought that I had made sure it was not the problem (See SSH telnet working with Putty). I completely disabled it and it ended up working. I haven't figured out how to fix Norton yet, but I can work on that later with Symantec.
I hope I didn't waste too much of your time and I did learn some things, so thanks again - LZ
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.