Connection using an SSH key

The usual location for ssh keys is ~/.ssh on Mac/Linux and C:\Users\%username%\.ssh on Windows.

  • id_rsa.pub: the public key that must be installed on the servers to which you want to connect.
  • id_rsa: the private key that must be on the machine you are connecting from. The private key should never be given to other people.

Generate your SSH key

If you do not already have an SSH key, you can generate one:

Open a terminal and type ssh-keygen

Important:

  • Please enter a passphrase when creating your key pair.
  • Do not modify the default key name and save the key at the default location.

On Windows, if this command isn’t recognized, you should first install the OpenSSH client: Settings > Apps > Optional Features > Add a feature > OpenSSH Client.

After running ssh-keygen your public key is by default in:

  • ~/.ssh/id_rsa.pub on Mac/Linux
  • C:\Users\%username%.ssh\id_rsa.pub on Windows.

How to connect from different machines

You can install multiple public keys on Azzurra. It is recommended to have as many keys as machines from which you connect.

If you already have access to your Azzurra account, you can add a public key by editing your ~/.ssh/authorized_keys file on the cluster.

You can also install one key on several machines, although the above solution is recommended. To do so, copy your existing ~/.ssh/id_rsa file (C:\Users\%username%.ssh\id_rsa with Windows) into ~/.ssh/ on the other machine (C:\Users\%username%\.ssh with Windows) .

Frequent errors

If nothing happens when trying to connect:

  • There may be an error in your command, which should look like: ssh username@login-hpc.univ-cotedazur.fr
  • You are not connected to a network that allows you to reach the cluster. You need to either tell us you office’s IP address or use the university’s VPN (see here) and make sure that you are connected to your office’s network or the VPN.

If you get this message when trying to connect:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

You need to make sure the computer you are using stores the private ssh key associated with the public key you sent us. There must be a file named id_rsa (the private key) in your ~/.ssh folder for Mac/Linux or C:\Users\%username%\.ssh under Windows associated with a id_rsa.pub file (the public key) which is the same file you sent us when requesting your Azzurra account.

If this is OK but you still cannot connect, for Mac/Linux users only, you can open a terminal on your local computer and type:

ssh-add key

Replace key by the absolute path of your private key (for example: ~/.ssh/id_rsa).

Configure your key with FileZilla (Windows only)

To use your SSH key with FileZilla under Windows, see this page.