NoMachine is a terminal server software (cross-platform, for Linux, Windows and Mac) that allows one to remotely connect to a remote desktop over a network (e.g. the Internet). NoMachine uses the NX technology, that handles remote graphical connections, and attempts to greatly improve on the performance of the native display protocol to the point that it can be usable over a slow link such as a dial-up modem.
Why use key-based authentication?
Because is more safer (secure) then password based authentication. Read the articles for more information:
Are SSH Passwords Safer than Keys?
Information Security Stack Exchange: SSH password vs. key authentication
SSH: passwords or keys?
Wikipedia: Key authentication
- Download and install NoMachine for Windows
- Download the latest OpenSSH for Windows
(In my case the file for download is OpenSSH-Win64.zip)
1. Generate the SSH KEY:
Now open the compressed OpenSSH-Win64.zip file with WinRAR (or any file compression manager) and execute the file “ssh-keygen.exe”. Follow only the “Step Two—Store the Keys and Passphrase” from here.
2. Add a new the public SSH key in NoMachine
The public key (id_rsa.pub) and the private key (id_rsa.pub) files is now created on folder “c:\Users\YOUR-USERNAME\.ssh”.
Copy file from “id_rsa.pub” (public key) to “C:\Users\YOUR-USERNAME\.nx\config” and rename the file to “authorized.crt”.
Restart the service. Open cmd as Administrator:
net stop nxservice
net start nxservice
- Transfer your private key to your computer and test your access
Now copy your Private Key (the file id_rsa from folder “c:\Users\YOUR-USERNAME\.ssh”) to access your remote computer and configure the NoMachine Client, set path to your private key file.
NOTE: If you generate key with a passphrase (it’s recommended for more security and do not use non-ascii characters), you need know/memorize the username of NoMachine server installed. If you forget it, just open your public key, search the username in the end for like “username@machine-name”.
Open the file:
ssh-rsa AAAAB3NzaC1yc[...]FEaDF5+wNqWJ johndoe@hal9000-pc