个人工具

“UbuntuHelp:NomachineNX”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
第2行: 第2行:
 
{{Languages|UbuntuHelp:NomachineNX}}
 
{{Languages|UbuntuHelp:NomachineNX}}
 
Beware that the following packages are not free but if you're facing problems with the freeNX packages, it may be a good solution:
 
Beware that the following packages are not free but if you're facing problems with the freeNX packages, it may be a good solution:
setting up Nomachine NX packages on Ubuntu is now quite easy:
+
Setting up Nomachine NX packages on Ubuntu is now quite easy:
1. Download the Nomachine NX packages for Ubuntu (http://www.nomachine.com/download)
+
=== Server ===
2. Install the packages in this order: client, node, server
+
<ol><li>Launch Ubuntu desktop or the server edition and install ubuntu-desktop <pre><nowiki>
3. cp /usr/NX/etc/keys/node.localhost.id_dsa.pub  ~/tmp/node.localhost.id_dsa.pub.save
+
sudo aptitude install ubuntu-desktop
 +
</nowiki></pre>
 +
</li><li>Download the Nomachine NX packages for Ubuntu (http://www.nomachine.com/download)</li></ol>
  
./nxnode --keyadd ~/tmp/node.localhost.id_dsa.pub.save
+
(versions as of 2010-01-22) <pre><nowiki>
 +
wget http://64.34.161.181/download/3.4.0/Linux/nxclient_3.4.0-5_i386.deb
 +
wget http://64.34.161.181/download/3.4.0/Linux/nxnode_3.4.0-6_i386.deb
 +
wget http://64.34.161.181/download/3.4.0/Linux/FE/nxserver_3.4.0-8_i386.deb
 +
</nowiki></pre>
 +
<ol><li>Install the packages in this order: client, node, server
 +
</li><li>Import localhost key <pre><nowiki>
 +
sudo cp /usr/NX/etc/keys/node.localhost.id_dsa.pub  \
 +
    /tmp/node.localhost.id_dsa.pub.save
 +
</nowiki></pre></li></ol>
 +
 
 +
<pre><nowiki>
 +
sudo /usr/NX/bin/nxnode --keyadd /tmp/node.localhost.id_dsa.pub.save  
 +
</nowiki></pre>
 
(Caveat: Don't directly import the file /usr/NX/etc/keys/node.localhost.id_dsa.pub. First copy it, otherwise it will be deleted after the importation).
 
(Caveat: Don't directly import the file /usr/NX/etc/keys/node.localhost.id_dsa.pub. First copy it, otherwise it will be deleted after the importation).
4. /usr/NX/bin/nxserver --keygen
+
<ol><li>Regenerate new SSH key for NX user as the default is common for all others <pre><nowiki>
5. import the new private DSA key to the client. This file is located here:
+
sudo /usr/NX/bin/nxserver --keygen
 +
</nowiki></pre>
 +
</li><li>Change the owner of the nx user public key on the server <pre><nowiki>
 +
sudo chown nx:root /usr/NX/home/nx/.ssh/authorized_keys2
 +
</nowiki></pre>
 +
<ol><li>If you are going to use it with e.g. [http://aws.amazon.com/ec2 Amazon ec2], then NX's hard link between authorized_keys2 and the default.id_dsa.key will create problems when bundling AMIs. <pre><nowiki>
 +
sudo cp /usr/NX/home/nx/.ssh/authorized_keys2 \
 +
      /usr/NX/home/nx/.ssh/authorized_keys2.tmp
 +
 +
sudo rm /usr/NX/home/nx/.ssh/authorized_keys2
 +
 +
sudo cp /usr/NX/home/nx/.ssh/authorized_keys2.tmp \
 +
    /usr/NX/home/nx/.ssh/authorized_keys2
 +
</nowiki></pre>
 +
</li><li>Check that the name conforms to the filename given in the /etc/ssh/sshd_config file. With the default Ubuntu SSH setting this is not neccessary, but someone might have changed it to e.g.: <code><nowiki>authorized_keys</nowiki></code> <pre><nowiki>
 +
-- sudo chmod 0644 /usr/NX/home/nx/.ssh/authorized_keys2 --
 +
 +
-- sudo mv /usr/NX/home/nx/.ssh/authorized_keys2 \
 +
    /usr/NX/home/nx/.ssh/authorized_keys --
 +
</nowiki></pre>
 +
</li></ol></li><li>Editing SSH configuration:<pre><nowiki>
 +
sudo vi /etc/ssh/sshd_config
 +
</nowiki></pre>
 +
<ol><li>You will need to enable password login into SSH: <pre><nowiki>
 +
PasswordAuthentication yes
 +
UsePam yes
 +
</nowiki></pre>
 +
</li><li>If you have restricted SSH with <code><nowiki>AllowUser</nowiki></code> you need to add <code><nowiki>nx</nowiki></code> to the list: <pre><nowiki>
 +
AllowUser nx ''youruser'''
 +
</nowiki></pre>
 +
</li></ol></li><li>It may be neccessary to remove a line in SSH's your known host file for your user on the server, or remove it all together(reset it): <pre><nowiki>
 +
  sudo rm /home/''youruser''/.ssh/known_hosts
 +
</nowiki></pre>
 +
</li><li>Restart services <pre><nowiki>
 +
sudo /etc/init.d/ssh restart
 +
sudo /etc/init.d/nxserver restart
 +
</nowiki></pre>
 +
</li><li>Check if your user will work: <pre><nowiki>
 +
sudo /usr/NX/bin/nxserver --usercheck ''youruser''
 +
</nowiki></pre></li></ol>
  
/usr/NX/share/keys/default.id_dsa.key
+
=== Client ===
6. Change the owner of the nx user public key on the server and check that the name conforms to the filename given in the /etc/ssh/sshd_config file:
+
<ol><li>Install the client on your local machine.
 +
</li><li>Start it either via <code><nowiki>Applications/Internet/NX Client for Linux/NX Connection Wizard</nowiki></code> or via cmd line; <pre><nowiki>
 +
  /usr/NX/bin/nxclient --wizard &
 +
</nowiki></pre>
 +
</li><li>Enter the hostname and so on till you get prompted for login.
 +
</li><li>Enter your username and password.
 +
</li><li>Import the new nx key by:
 +
<ol><li>Downloading the new DSA key from the server:<pre><nowiki>
 +
scp ''SERVERNAME'':/usr/NX/share/keys/default.id_dsa.key \
 +
    ''SERVERNAME''.id_dsa.key
 +
</nowiki></pre>
 +
</li><li>Then click on ''Configure...'', then ''Key'' under ''General'' and then on ''Import''.
 +
</li><li>Find the file <code><nowiki>''SERVERNAME''.id_dsa.key</nowiki></code> and click save, save then Ok.
 +
</li></ol></li><li>Login should now hopefully work....</li></ol>
  
chown nx:root /usr/NX/home/nx/.ssh/authorized_keys2
+
References:
chmod 0644 /usr/NX/home/nx/.ssh/authorized_keys2
+
* http://soniahamilton.wordpress.com/2008/01/29/howto-setup-nomachinenx-on-ubuntu/
mv /usr/NX/home/nx/.ssh/authorized_keys2 /usr/NX/home/nx/.ssh/authorized_keys
+
* http://alestic.com/2009/11/ec2-karmic-desktop
That's it.
+
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 23:45的最新版本

Beware that the following packages are not free but if you're facing problems with the freeNX packages, it may be a good solution: Setting up Nomachine NX packages on Ubuntu is now quite easy:

Server

  1. Launch Ubuntu desktop or the server edition and install ubuntu-desktop
     sudo aptitude install ubuntu-desktop 
     
  2. Download the Nomachine NX packages for Ubuntu (http://www.nomachine.com/download)
(versions as of 2010-01-22)
 wget http://64.34.161.181/download/3.4.0/Linux/nxclient_3.4.0-5_i386.deb
 wget http://64.34.161.181/download/3.4.0/Linux/nxnode_3.4.0-6_i386.deb
 wget http://64.34.161.181/download/3.4.0/Linux/FE/nxserver_3.4.0-8_i386.deb
 
  1. Install the packages in this order: client, node, server
  2. Import localhost key
     
     sudo cp /usr/NX/etc/keys/node.localhost.id_dsa.pub  \
         /tmp/node.localhost.id_dsa.pub.save 
     
 
 sudo /usr/NX/bin/nxnode --keyadd /tmp/node.localhost.id_dsa.pub.save 
 

(Caveat: Don't directly import the file /usr/NX/etc/keys/node.localhost.id_dsa.pub. First copy it, otherwise it will be deleted after the importation).

  1. Regenerate new SSH key for NX user as the default is common for all others
     sudo /usr/NX/bin/nxserver --keygen
     
  2. Change the owner of the nx user public key on the server
     sudo chown nx:root /usr/NX/home/nx/.ssh/authorized_keys2
     
    1. If you are going to use it with e.g. Amazon ec2, then NX's hard link between authorized_keys2 and the default.id_dsa.key will create problems when bundling AMIs.
       sudo cp /usr/NX/home/nx/.ssh/authorized_keys2 \
            /usr/NX/home/nx/.ssh/authorized_keys2.tmp
       
       sudo rm /usr/NX/home/nx/.ssh/authorized_keys2 
       
       sudo cp /usr/NX/home/nx/.ssh/authorized_keys2.tmp \
          /usr/NX/home/nx/.ssh/authorized_keys2
       
    2. Check that the name conforms to the filename given in the /etc/ssh/sshd_config file. With the default Ubuntu SSH setting this is not neccessary, but someone might have changed it to e.g.: authorized_keys
       -- sudo chmod 0644 /usr/NX/home/nx/.ssh/authorized_keys2 --
       
       -- sudo mv /usr/NX/home/nx/.ssh/authorized_keys2 \
          /usr/NX/home/nx/.ssh/authorized_keys --
       
  3. Editing SSH configuration:
     sudo vi /etc/ssh/sshd_config
     
    1. You will need to enable password login into SSH:
       PasswordAuthentication yes
       UsePam yes
       
    2. If you have restricted SSH with AllowUser you need to add nx to the list:
       AllowUser nx ''youruser'''
       
  4. It may be neccessary to remove a line in SSH's your known host file for your user on the server, or remove it all together(reset it):
      sudo rm /home/''youruser''/.ssh/known_hosts
     
  5. Restart services
     sudo /etc/init.d/ssh restart
     sudo /etc/init.d/nxserver restart
     
  6. Check if your user will work:
     sudo /usr/NX/bin/nxserver --usercheck ''youruser''
     

Client

  1. Install the client on your local machine.
  2. Start it either via Applications/Internet/NX Client for Linux/NX Connection Wizard or via cmd line;
      /usr/NX/bin/nxclient --wizard &
     
  3. Enter the hostname and so on till you get prompted for login.
  4. Enter your username and password.
  5. Import the new nx key by:
    1. Downloading the new DSA key from the server:
       scp ''SERVERNAME'':/usr/NX/share/keys/default.id_dsa.key \
           ''SERVERNAME''.id_dsa.key
       
    2. Then click on Configure..., then Key under General and then on Import.
    3. Find the file ''SERVERNAME''.id_dsa.key and click save, save then Ok.
  6. Login should now hopefully work....

References: