<br><font size=1 face="sans-serif"><b>Julio Carlos Barrera Juez <juliocarlos.barrera@grupoica.com></b>
Sent by: freenx-knx-bounces@kde.org</font>
<br>
<p><font size=1 face="Tahoma">Ok, </font>
<br>
<br><font size=1 face="Tahoma">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?</font>
<br>
<br>
<br><font size=2 color=red face="Arial">Well it is very easy (if you know
how).</font>
<br>
<br>
<br><font size=1 face="Tahoma"> If it was, it would be easy to use
any SSH client.</font>
<br>
<br><font size=1 face="Tahoma">Thank you!</font>
<br>
<br><font size=2 color=red face="Arial">[SNIP]</font>
<br>
<br><font size=2 color=#004080 face="sans-serif"> </font>
<br><font size=1 color=#004080 face="sans-serif">Info: Agent running with
pid '8524'.</font>
<br><font size=1 color=#004080 face="sans-serif">Session: Starting session
at 'Fri Jul 6 13:49:32 2012'.</font>
<br><font size=1 color=#004080 face="sans-serif">Info: Proxy running in
server mode with pid '8524'.</font>
<br><font size=1 color=#004080 face="sans-serif">Info: Waiting for connection
from '127.0.0.1' on port '6011'.</font>
<br><font size=1 color=#004080 face="sans-serif">Info: Accepted connection
from '127.0.0.1'.</font>
<br><font size=1 color=#004080 face="sans-serif">Info: Aborting the procedure
due to signal '1'.</font>
<br><font size=1 color=#004080 face="sans-serif">Error: Aborting session
with <b>'Unable to open display</b> 'nx/nx,options=/home/logoff/.nx/C-Virtual-Xubuntu-2011-2759B7A3A04A7A53439B9CD1E7ED183E/options:2011''.</font>
<br>
<br><font size=2 color=red face="Arial">Your Xauthority isn't set up correctly
( what else )</font>
<br>
<br>
<br><font size=1 color=#004080 face="sans-serif">Session: Aborting session
at 'Fri Jul 6 13:50:32 2012'.</font>
<br><font size=1 color=#004080 face="sans-serif">Session: Session aborted
at 'Fri Jul 6 13:50:32 2012'.</font>
<br><font size=1 color=#004080 face="sans-serif"> </font>
<br><font size=1 color=#004080 face="sans-serif"> </font>
<br><font size=2 color=#004080 face="sans-serif">What I’m doing bad?</font>
<br><font size=2 color=#004080 face="sans-serif"> </font>
<br><font size=2 color=#004080 face="sans-serif">Thank you!</font>
<br><font size=2 color=red face="Arial"> </font>
<br><font size=2 color=red face="Arial"> </font>
<br><font size=2 color=red face="Arial">[SNIP]</font>
<br>
<br>
<br><font size=2 color=red face="Arial">Here's an example "bare-bones"
session set up which might help.</font>
<br>
<br><font size=2 color=red face="Arial">Change </font><font size=2 color=blue face="Arial">user</font><font size=2 color=red face="Arial">
to match but keep all the cookies etc the same</font>
<br>
<br>
<br>
<br>
<br>
<br><font size=2 color=#ff00ff face="Arial">On your workstation</font>
<br><font size=2 color=#ff00ff face="Arial">-----------------------------</font>
<br>
<br><font size=2 color=red face="Arial">ssh -L 127.0.0.1:5000:127.0.0.1:5000
me@myserver # Tunnel and commend line on Nxserver</font>
<br>
<br>
<br><font size=2 color=red face="Arial">me@myserver:~> </font><font size=2 color=#ff00ff face="Arial">###
( Now you are on your server, but I'll miss the prompts from now on . .
. . )</font>
<br>
<br><font size=2 color=red face="Arial">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/</font><font size=2 color=blue face="Arial">user</font><font size=2 color=red face="Arial">/nxagent-test-options
#########
create an resonable options file on the nxserver</font>
<br>
<br>
<br><font size=2 color=red face="Arial">touch /home/</font><font size=2 color=blue face="Arial">user</font><font size=2 color=red face="Arial">/nxagent-test-options-authority
## Create an xauthority file for the nx session</font>
<br>
<br>
<br><font size=2 color=red face="Arial">xauth -f /home/</font><font size=2 color=blue face="Arial">user</font><font size=2 color=red face="Arial">/nxagent-test-options-authority
<<EOF</font>
<br><font size=2 color=red face="Arial">add localhost:1000 MIT-MAGIC-COOKIE-1
5bdd0b762200c7fbcf64480fab347080</font>
<br><font size=2 color=red face="Arial">add :1000 MIT-MAGIC-COOKIE-1 5bdd0b762200c7fbcf64480fab347080</font>
<br><font size=2 color=red face="Arial">exit</font>
<br><font size=2 color=red face="Arial">EOF</font>
<br>
<br><font size=2 color=red face="Arial">###### Populate the xauthority
file using the apropriate cookie and display</font>
<br>
<br><font size=2 color=red face="Arial">XAUTHORITY="/home/</font><font size=2 color=blue face="Arial">user</font><font size=2 color=red face="Arial">/nxagent-test-options-authority"
DISPLAY="nx/nx,options=/home/</font><font size=2 color=blue face="Arial">user</font><font size=2 color=red face="Arial">/nxagent-test-options:1000"
nxagent -persistent -D -name "Test" -option /home/</font><font size=2 color=blue face="Arial">user</font><font size=2 color=red face="Arial">/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</font>
<br>
<br>
<br><font size=2 color=red face="Arial">I just tested it and got :-</font>
<br>
<br><font size=2 color=red face="Arial">NXAGENT - Version 3.5.0</font>
<br>
<br><font size=2 color=red face="Arial">Copyright (C) 2001, 2011 NoMachine.</font>
<br><font size=2 color=red face="Arial">See </font><a href=http://www.nomachine.com/><font size=2 color=red face="Arial">http://www.nomachine.com/</font></a><font size=2 color=red face="Arial">
for more information.</font>
<br>
<br><font size=2 color=red face="Arial">Info: Agent running with pid '16916'.</font>
<br><font size=2 color=red face="Arial">Session: Starting session at 'Sat
Jul 7 etc 2012'.</font>
<br><font size=2 color=red face="Arial">Info: Proxy running in server mode
with pid '16916'.</font>
<br><font size=2 color=red face="Arial">Info: Waiting for connection from
'127.0.0.1' on port '5000'.</font>
<br>
<br>
<br>
<br>
<br><font size=2 color=#ff00ff face="Arial">Now back on the WORKSTATION
in another teminal</font>
<br>
<br>
<br><font size=2 color=red face="Arial">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</font>
<br>
<br>
<br><font size=2 color=red face="Arial"> </font>
<br><font size=2 color=red face="Arial">NXPROXY - Version 3.5.0</font>
<br>
<br><font size=2 color=red face="Arial">Copyright (C) 2001, 2011 NoMachine.</font>
<br><font size=2 color=red face="Arial">See </font><a href=http://www.nomachine.com/><font size=2 color=red face="Arial">http://www.nomachine.com/</font></a><font size=2 color=red face="Arial">
for more information.</font>
<br>
<br><font size=2 color=red face="Arial">Info: Proxy running in client mode
with pid '3958'.</font>
<br><font size=2 color=red face="Arial">Session: Starting session at 'Sat
Jul 7 etc 2012'.</font>
<br><font size=2 color=red face="Arial">Info: Connecting to remote host
'localhost:5000'.</font>
<br><font size=2 color=red face="Arial">Info: Connection to remote proxy
'localhost:5000' established.</font>
<br><font size=2 color=red face="Arial">Info: Connection with remote proxy
completed.</font>
<br><font size=2 color=red face="Arial">Warning: Unrecognized session type
'unix-kde'. Assuming agent session.</font>
<br><font size=2 color=red face="Arial">Info: Using ADSL link parameters
512/24/1/0.</font>
<br><font size=2 color=red face="Arial">Info: Using cache parameters 4/4096KB/131072KB/131072KB.</font>
<br><font size=2 color=red face="Arial">Info: Using pack method 'adaptive-7'
with session 'unix-kde'.</font>
<br><font size=2 color=red face="Arial">Info: Using ZLIB data compression
1/1/32.</font>
<br><font size=2 color=red face="Arial">Info: Using ZLIB stream compression
4/4.</font>
<br><font size=2 color=red face="Arial">Info: No suitable cache file found.</font>
<br><font size=2 color=red face="Arial">Info: Forwarding X11 connections
to display ':0'.</font>
<br><font size=2 color=red face="Arial">Session: Session started at 'Sat
Jul 7 etc'.</font>
<br><font size=2 color=red face="Arial">Info: Established X server connection.</font>
<br><font size=2 color=red face="Arial">Info: Using shared memory parameters
1/4096K.</font>
<br>
<br>
<br><font size=2 color=red face="Arial">You should get an black nx screen
on your workstation . . . </font>
<br>
<br>
<br><font size=2 color=#ff00ff face="Arial">Back on the server do</font>
<br>
<br><font size=2 color=red face="Arial">Ctrl-z to suspend nxagent and then
bg to put nxagent into the background and get your prompt back</font>
<br>
<br>
<br><font size=2 color=red face="Arial">at the prompt enter</font>
<br>
<br><font size=2 color=red face="Arial">DISPLAY=:1000 XAUTHORITY="/home/</font><font size=2 color=blue face="Arial">user</font><font size=2 color=red face="Arial">/nxagent-test-options-authority"
xterm ###
to set up the env and run xterm in the nxwindow</font>
<br>
<br>
<br><font size=2 color=#ff00ff face="Arial">Back on your workstation nxscreen
you should see an xterm . . .</font>
<br>
<br><font size=2 color=red face="Arial">In the xterm, enter metacity (or
kwin if you prefer KDE) , you should have a nice window managed session.</font>
<br>
<br><font size=2 color=red face="Arial">Apologies for any typos . . . .
</font>
<br>
<br>
<br>
<br>
<br>