[FreeNX-kNX] establish a encrypted NX session using an alternative SSH client

chris at ccburton.com chris at ccburton.com
Sat Jul 7 16:49:48 UTC 2012


Julio Carlos Barrera Juez <juliocarlos.barrera at grupoica.com> Sent by: 
freenx-knx-bounces at kde.org

Ok, 

it is very easy, I want to establish an encrypted NX session without 
'nxssh', only openssh client. I achieve all the process until the switch 
to the SSL tunnel. I want to construct this tunnel using 'ssh -L'. Is it 
possible?


Well it is very easy (if you know how).


 If it was, it would be easy to use any SSH client.

Thank you!

[SNIP]

 
Info: Agent running with pid '8524'.
Session: Starting session at 'Fri Jul  6 13:49:32 2012'.
Info: Proxy running in server mode with pid '8524'.
Info: Waiting for connection from '127.0.0.1' on port '6011'.
Info: Accepted connection from '127.0.0.1'.
Info: Aborting the procedure due to signal '1'.
Error: Aborting session with 'Unable to open display 
'nx/nx,options=/home/logoff/.nx/C-Virtual-Xubuntu-2011-2759B7A3A04A7A53439B9CD1E7ED183E/options:2011''.

Your Xauthority isn't set up correctly ( what else )


Session: Aborting session at 'Fri Jul  6 13:50:32 2012'.
Session: Session aborted at 'Fri Jul  6 13:50:32 2012'.
 
 
What I’m doing bad?
 
Thank you!
 
 
[SNIP]


Here's an example "bare-bones" session set up which might help.

Change user to match but keep all the cookies etc the same





On your workstation
-----------------------------

ssh -L  127.0.0.1:5000:127.0.0.1:5000 me at myserver  # Tunnel and commend 
line on Nxserver


me at myserver:~>   ### ( Now you are on your server, but I'll miss the 
prompts from now on . . . . )

echo 
"keyboard=pc102/gb,client=linux,resize=1,cache=128M,images=512M,link=adsl,nodelay=1,type=unix-kde,cleanup=0,accept=127.0.0.1,cookie=5bdd0b762200c7fbcf64480fab347080,id=myserver-1000-E744309C8AD554E476EC3F07D378F371,samba=0,media=0,clipboard=both,menu=1:1000" 
> /home/user/nxagent-test-options                     ######### create an 
resonable options file on the nxserver


touch /home/user/nxagent-test-options-authority ## Create an xauthority 
file for the nx session


xauth -f   /home/user/nxagent-test-options-authority  <<EOF
add localhost:1000 MIT-MAGIC-COOKIE-1 5bdd0b762200c7fbcf64480fab347080
add :1000 MIT-MAGIC-COOKIE-1 5bdd0b762200c7fbcf64480fab347080
exit
EOF

######   Populate the xauthority file using the apropriate cookie and 
display

XAUTHORITY="/home/user/nxagent-test-options-authority" 
DISPLAY="nx/nx,options=/home/user/nxagent-test-options:1000" nxagent 
-persistent -D -name "Test" -option /home/user/nxagent-test-options 
-keyboard pc102/gb -geometry 1280x1024 -nolisten tcp :1000       ##### 
Update the env-vars and launch nxagent using the xauthority display and 
options file


I just tested it and got  :-

NXAGENT - Version 3.5.0

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

Info: Agent running with pid '16916'.
Session: Starting session at 'Sat Jul  7 etc 2012'.
Info: Proxy running in server mode with pid '16916'.
Info: Waiting for connection from '127.0.0.1' on port '5000'.




Now back on the WORKSTATION in another teminal


nxproxy -S 
nx/nx,keyboard=pc102/gb,client=linux,nodelay=1,cleanup=0,cookie=5bdd0b762200c7fbcf64480fab347080,id=myserver-1000-E744309C8AD554E476EC3F07D378F371,samba=0,media=0,clipboard=both,menu=1:1000,connect=localhost:1000


 
NXPROXY - Version 3.5.0

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

Info: Proxy running in client mode with pid '3958'.
Session: Starting session at 'Sat Jul  7 etc 2012'.
Info: Connecting to remote host 'localhost:5000'.
Info: Connection to remote proxy 'localhost:5000' established.
Info: Connection with remote proxy completed.
Warning: Unrecognized session type 'unix-kde'. Assuming agent session.
Info: Using ADSL link parameters 512/24/1/0.
Info: Using cache parameters 4/4096KB/131072KB/131072KB.
Info: Using pack method 'adaptive-7' with session 'unix-kde'.
Info: Using ZLIB data compression 1/1/32.
Info: Using ZLIB stream compression 4/4.
Info: No suitable cache file found.
Info: Forwarding X11 connections to display ':0'.
Session: Session started at 'Sat Jul  7 etc'.
Info: Established X server connection.
Info: Using shared memory parameters 1/4096K.


You should get an black nx screen on your workstation . . . 


Back on the server   do

Ctrl-z to suspend nxagent and then bg to put nxagent into the background 
and get your prompt back


at the prompt enter

DISPLAY=:1000 XAUTHORITY="/home/user/nxagent-test-options-authority" xterm 
                  ### to set up the env and run xterm in the nxwindow


Back on your workstation nxscreen you should see an xterm . . .

In the xterm, enter metacity (or kwin if you prefer KDE) , you should have 
a nice window managed session.

Apologies for any typos . . . . 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20120707/6069c258/attachment.html>


More information about the FreeNX-kNX mailing list