How to migrate the ssh keys from one NX 3.5.0 server machine to another machine
The initial login between client and server happens through a DSA key pair. The installation procedure provides a default key pair. These keys can be replaced by your own keys, generated by nxserver --keygen, see this article for more information bout how to replace the SSH keys used by NX with your own keypair generated for the nx user:
https://www.nomachine.com/AR01C00126
To avoid having to transfer your own dsa key to all clients in a situation when a NX server is newly installed at the same or a higher version on a different machine, you can keep your own key pair by following this procedure:
1. Archive all keys from the old NX server installation:
cd /usr/NX
tar -cvf keys.tar share/keys/server.id_dsa.key /home/nx/.ssh/default.id_dsa.pub /home/nx/.ssh/authorized_keys2
2. Copy keys.tar to the new server machine
3. After the NX installation put the keys into the target directories on the new installation:
cp keys.tar /usr/NX/
tar -xvf keys.tar
4. Verify the correct permissions and ownership
-rw-r--r-- 1 root root 668 home/nx/.ssh/authorized_keys2
-rw-r--r-- 1 root root 668 home/nx/.ssh/default.id_dsa.pub
-rw-r--r-- 1 root root 668 share/keys/server.id_dsa.key
Note for Advanced Server installations:
/usr/NX/etc/keys/node.localhost.id_dsa
and
/usr/NX/etc/keys/node.localhost.id_dsa.pub
are not needed in a single NX server setup, but have to be backed up and copied to the nodes in an Advanced Server setup.
