NoMachine Support

Your questions answered

Knowledge Base

Searching in: Articles & FAQs
Filter the search results
Applies to:
Last update:
Searching in: Articles & FAQs
ID: AR12I00615
Applies to: NoMachine Server
Added on: 2011-12-09
Last update: 2017-11-20
Use a SSH private key when connecting from NoMachine client (v. 5 or 4)

This article applies to NoMachine v. 4 and v. 5.

For NoMachine v. 6, please read here: https://www.nomachine.com/AR11O00948


SSH key-based authentication is supported for both connections by 1) NX  and 2) SSH protocol. When the SSH protocol is used, it's also possible to use the 3) NoMachine login which relies on the intial authentication between client-server using a SSH key pair plus the user's password-based authentication on the system.

These methods have to be set in the NoMachine User Interface (GUI) on the user's device.

 

1)  Connections by NX protocol and private key  (key-based authentication)
To set up key based authentication with NX protocol, please refer to the following article:

https://www.nomachine.com/AR02L00785

 

To configure the connection to use the SSH private key, on your computer:

1. Open the NoMachine User Interface from Programs menu or Applications.
2. Click on the connection icon to configure its settings (little wheel icon on the session item ) .
3. Click on Edit button.
4. Select Protocol NX and click on Advanced button.
5. Choose 'Private key' as authentication method and click on Settings button.
6. Browse the file system to point to the file containing the private key.  

Since client version 5.1.7 it' possible to store the private key in the connection file by checking the 'Import the private key to the connection file'  option.

8. Continue to click on OK button to come back to the previous panel until the connection settings panel.
9. Then click on OK and finally Click on Connect to initiate the connection.

The client will prompt you for username and passphrase. If your SSH key doesn't have a passhprase, leave this field empty.

 

2) Connect by SSH protocol + system login and private key  (key-based authentication) (not available with NoMachine free)
To set up key based authentication with SSH protocol, please refer to the following article:

https://www.nomachine.com/AR06O00932

To configure the connection to use the SSH private key, on your computer:

1. Open the NoMachine User Interface (GUI).
2. Click on the connection icon to configure its settings (little wheel icon on the session item ) .
3. Click on Edit button.
4. Select Protocol SSH and click on Advanced button.
5. Choose 'Use the system login' and click on Settings button.
6. Select 'Private key' as authentication method and click on Settings button.
7. Browse the file system to point to the file containing the private key.    

To store the private key in the connection file, check the 'Import the private key to the connection file' check box. This option is available since client version 5.1.7.

8. Continue to click on OK button to come back to the previous panel until the connection settings panel.
9. Then click on OK and finally Click on Connect to initiate the connection.

The client will prompt you for username and passphrase. If your SSH key doesn't have a passhprase, leave this field empty.


3) Connect by SSH + NoMachine login using a customized SSH key pair for the nx user (not available with NoMachine free)

The SSH key is used to let the client authenticate as user nx on the remote host, the user will still need to provide his credentials to log-in. I.e. user's key-based authentication is not available.

Refer to this article about how to generate a custom SSH key pair on the server for the NoMachine login and distribute it to users: https://www.nomachine.com/AR01C00126

To configure the connection to use the NoMachine login + SSH private key, on your computer:

1. Open the NoMachine User Interface from Programs menu or Applications.
2. Click on the connection icon to configure its settings (little wheel icon on the session item ) .
3. Click on Edit button.
4. Select Protocol SSH and click on Advanced button.
5. Choose 'Use the NoMachine login' and click on Settings button.
6. Flag 'Use an alternate server key' check box.
7. Browse the file system to point to the file containing the private key.
8. Continue to click on OK button to come back to the previous panel until the connection settings panel.
9. Click on Connect button to initiate the connection.

The private key file will be read and its content will be stored in the settings file, in the same way NX Client 3.5.0 does.

10.Provide your credentials (username and password) to log-in to the remothe computer.