How do I do password-less authentication with Altair SLC Link?

Nico Chart_21517
Nico Chart_21517
Altair Employee
edited October 15 in Altair RapidMiner

You need to have a private key on your client workbench machine stored in a local SSH directory called .ssh at the root of your user account, typically $HOME/.ssh on Linux and macOS, and C:\Users\USERNAME\.ssh on Windows. You also need a public key to match, and this file will have to be copied to the server machine where SLC is going to be running. So you will also need a .ssh directory under your home directory on the server machine.

To create these key files, open the Workbench and select Window->Preferences. (On the Mac this is on the Workbench menu under 'Settings...') Find the SSH preference settings under General->Network Connections->SSH2. Open the Key Management tab and select the 'Generate RSA Key …' button. Add and confirm a passphrase if you would like to use one (see note1 below) and then select 'Save Private Key'. You should see 2 new files in your local .ssh folder, id_rsa (your private local key) and id_rsa.pub (your public key for sharing to remote hosts).

Transfer the contents of id_rsa.pub to your remote host file... append to the file .ssh/authorized_keys (create the file if necessary).

SSH is sensitive to file and directory permissions. On Unix and macOS check:

$HOME should have 755 permissions
.ssh should have 700 permissions
id_rsa should have 600 permissions (client side)
authorized_hosts should have 600 permissions (server side)

In your local client workbench create a New remote Host Connection using the workbench Altair->Link->New Remote Host Connection entry and using the Wizard select 'New SSH Connection' then Next. In the New Remote Host Connection form enter the remote host Name and your username and then select Finish.

If you created a passphrase for your authentication you should see a dialog box appear to enter the passphrase. Enter the passphrase and finish.

A remote connection should have been established. You can check this by using the File Explorer subwindow and opening the remote host to browse the file store.

(Before continuing, you need to restart Workbench to ensure your changes have been adopted.)

Select the remote host in the Link Explorer and using the right hand mouse key select New Altair SLC Server. A form should appear asking you to enter or browse for the path to where the wps command line interface has been installed on your remote host. If you have entered the path correctly then a new remote server will start providing your remote installation is properly licensed.

note1: If you include a passphrase, then you end up in the same situation (i.e. you still need to enter a password to authenticate) unless you then set up 'sshagent'. The ssh agent is something that runs locally (on the same machine as Workbench) and into which you load the private key and "open" it using the password. Then whatever needs the key can access it without further password authentication. So you have to type the password in once during the lifetime of your machine being turned on. Without sshagent, public key authentication with a passphrase protected private key is not really any different from standard password authentication.