[FreeNX-kNX] Server setup; no logging & command not found

Lucky0106 lucky0106 at msn.com
Sun Feb 23 20:21:42 UTC 2014


On 2/23/2014 5:54 AM, chris at ccburton.com wrote:
>
> freenx-knx-bounces at kde.org wrote on 22/02/2014 18:49:23:
>
> >> So
> >>
> >> now you know
> >>          your nx account is fine
> >> and
> >>         nxserver is installed . . .
> >> which
> >>         should log you in as
> >>                  user "glen"
> >> provided
> >> your user "glen" account can log in
> >>          set in /etc/ssh/sshd_config)
> > I guess I don't quite understand why PasswordAuth needs to be
> > enabled in SSH. It does look like I'm logging in fine through SSH
> > (since the welcome message shows up in NX's client log).
>
> NX uses s key pair for the user
>         nx
> to set up an ssh "encrypted tunnel" to move your compressed
> X session over the network.
>
> It then logs in the normal user to ANOTHER LOCAL ssh
> session using
>
>          ssh PasswordAuthentication
>
> from
> the end of the tunnel on the NX server
> to
> the same NX server  ie. ssh 127.0.0.1
>
> The first ssh session uses user nx and the nx key pair
> so
> you add the nx key to the nxclient
> and
> don't worry about user nx 'cos the client knows
>
> The second session uses
>         your username (glen)
> and
>          glen's password on the FreeNX server
> so
> you put glen & glen's password into the nxclient
> login entry fields.
>
>
> You do NOT need your ssh key OR username nx
> ANYWHERE for NXv3 login unless you have moved
> away from the default login method
>
>
> > I've tried enabling PasswordAuth anyways (and restarting the
> > machine), and here's the result:
>
> > Pseudo-terminal will not be allocated because stdin is not a terminal.
> >
> > Permission denied (publickey,password).
>
> Different error. which user are you attemting to log ing in as??
>
>          nx ??
>
> >
> > And I'm entering the exact password I normally use to log into my
> > account on the machine.
>
> OK , so what's new in the nx server log just after this attempt ??
>
>
> >> Here's another annoying test to help you along
> >>>
> >> 1/ Add the nx private key (as a new key file) to your .ssh/ directory
> >>         in the same format as the other private keys.
> >>         Sounds like you generated your own pair 2me
> >>
> >> 2/ run
> >>
> >>         ssh  -l nx     -i ~/.ssh/new-nx-private-key.file   
>  your-server-IP
>
>
> > Alright, so I go to /var/lib/nxserver/home/default_keys (which is
> > where the key is stored, I believe).
> > I copy the key named client.id_dsa.key dated at Mar 22 2012
> > to ~/.ssh/nx_priv_key.dsa,
> > then I run
> > ssh -l nx -i ~/ssh/nx_priv_key.dsa 192.168.1.133.
> > SSH continues to
> > warn me about the authenticity of the server,
>
> normal
>
> > asks me if I want to continue (I say yes),
> > says it was permanentlyadded to the list of known hosts,
>
> normal
>
> > warns me about an unprotected key file,
> > warns that permissions are too open,
> > then tells me that it will be ignored.
>
> The key file will be ignored unless its mode 0700
>
> > It then asks me for nx's password, of which I have no clue,
>
> cos it can't use the (ignored) key file so it tries password
>
> *** user nx should have NO password set ***
>
>
> > so after trying my own password,
> > I send a SIGINT to ssh and go about changing the permissions
> > on the key file.
>
> Well done
>
> > I give myself (and only myself) read permissions on the new
> > copy of the key file, and run the previous ssh command again.
>
> well done again. I could list all these detail things but most
> people already know or work or ask . . .
>
>
> > At this point, the SSH welcome message is printed,
>
> right
>
> > and to my great surprise,
>
> . . . but it's not surprising to me . . .
>
> You are now connected using the correct name(nx) and key pair.
>
>
>
> *** You need this key for the nxclient. ***
>
> copy it from the file into the entry field in the nx client
>
Alright: Here's a new test. This time, I logged in over SFTP and copied 
the file just to be sure they were the same (it seems like I may have 
actually had a different key file!). With the new file in hand, I fire 
up NoMachine again, and started the log in process. Now, it just seems 
to indefinitely sit at the screen saying Connecting to glenux. I looked 
through my auth.log, and found this bit:

> Feb 23 15:05:51 glenux sshd[2489]: Accepted publickey for nx from 
> 192.168.1.121 port 49976 ssh2
> Feb 23 15:05:51 glenux sshd[2489]: pam_unix(sshd:session): session 
> opened for user nx by (uid=0)

So it must have authed with SSH at this point? The only problem, though, 
is that it appears nxserver is not creating a new log file in the 
/var/log directory.

>
> > nxserver says hello and gives me a prompt of its own!
> > I don't know what to do at this point so I say "BYE".
>
> You can at this point test log in as your user
>
> ( yup, another annoying test )
>
> at that
>          "NX > 105 " prompt
>  ( your version will probably be different )
> enter
>          login <return>
> expect
>          "NX> 101 User:"
> enter
>          "glen" <return>
> expect
>         "NX> 102 Password:"
>
> now enter user account "glen"'s password and return
> (you still have PasswordAuthentication yes I hope )
>
> expect
>         "NX> 103 Welcome to: harrow user: glen
>          NX> 105"
>
> If you <return>  you will see a "quit" reply
>
> eg.
>
>
> HELLO NXSERVER - Version 3.2.0-73 OS (GPL, using backend: 3.5.0)
> NX> 105 login
> login
> NX> 101 User: glen
> glen
> NX> 102 Password:
> NX> 103 Welcome to: servername user: glen
> NX> 105
>
> quit
> Quit
> NX> 999 Bye
Ok, I gave that a try:

> HELLO NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
> NX> 105 login
> login
> NX> 101 User: glen
> glen
> NX> 102 Password:
> NX> 103 Welcome to: glenux user: glen
> NX> 105
> quit
> Quit
> NX> 999 Bye
> /usr/bin/nxserver: line 580: kill: (3426) - No such process
> Connection to 192.168.1.133 closed.
Well, so far so good (I think...).
>
> >
> > Now, going back to the nomachine client on my windows computer, I
> > try logging in again over the ssh protocol with the nomachine login
> > and using the nxserver private key. I again attempt logging in with
> > my ubuntu user and password, although authentication fails once again:
>
> > Pseudo-terminal will not be allocated because stdin is not a terminal.
> >
> > Permission denied (publickey,password).
> > Any further ideas?
>
> Yup.
>
> put the correct key ( for user nx ) into the client
> with
> your username and password ( glen, glen's password )
>
>
> Have
>         PasswordAuthentication yes
> in ssh
>
>
> Look in the log if it doesn't work and tell us what it says
> for the session you just tried
> ( you may have another issue too )
>
> Let us know how you get on . .
>
>
Ok, I may have forgotten this, but I guess I have to create the log file 
for nxserver if it doesn't exist :P I did that and confirmed everything 
was working by running the test log in, and it seemed like it was 
logging ok at that point.

Now, I try logging in with NoMachine again, and here is the result:

> glen at glenux:/var/log$ cat nxserver.log
>
> -- NX SERVER START:  - ORIG_COMMAND=
> -- NX SERVER START:  - ORIG_COMMAND=
> Info: Using fds #4 and #3 for communication with nxnode.
> HELLO NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
> 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: glen
> NX> 102 Password: glen at glenux:/var/log$
So either it's waiting for a password (and the client hasn't picked up 
on that), or the password was entered and it just doesn't know what to 
do now. Just for kicks and grins, I tried clearing all saved passwords 
in the client, then I tried logging in again. Same result.

>
>
>
>
> ________________________________________________________________
>       Were you helped on this list with your FreeNX problem?
>      Then please write up the solution in the FreeNX Wiki/FAQ:
>
> http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ
>
>           Don't forget to check the NX Knowledge Base:
>                   http://www.nomachine.com/kb/
>
> ________________________________________________________________
>         FreeNX-kNX mailing list --- FreeNX-kNX at kde.org
>        https://mail.kde.org/mailman/listinfo/freenx-knx
> ________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20140223/e427eca3/attachment.html>


More information about the FreeNX-kNX mailing list