Generate a pair of private and public key in your local machine with the keygen command. Do not enter any passphrase, just press Enter.
nicul@pc1nico:~$ ssh-keygen -t rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /homedtic/noko/.ssh/id_rsa.
Your public key has been saved in /homedtic/noko/.ssh/id_rsa.pub.
Copy the public key in the authentication system of the cluster.
|nicul@pc1nico:~/.ssh$ ssh-copy-id -i id_rsa.pub email@example.com|
Establish connection to the cluster.
Generate a pair of private and public key in the cluster with the keygen command, just like you did for Linux but in the cluster and not on the user local machine.
|noko@login:~$ ssh-keygen -t rsa|
Copy contain of the public key in the authorized_keys file found at homedtic/user/.ssh/ directory of the cluster.
|noko@login:~/.ssh$ cat id_rsa.pub /homedtic/noko/.ssh/authorized_keys|
If the authorized_keys file does not exist, create it.
|noko@login:~/.ssh$ vi authorized_keys|
Copy the private key to any directory of your choice on the local machine. This is the directory where you will redirect the Matlab configuration in case you select this password-less authentication method.