= SSH Key Management = SSH Keys is a way of identifying yourself to an SSH server using cryptography instead of the traditional username and password combination. This method has several advantages over the password based authentication: the passwords are not sent to trough the network, there is no risk for brute force attacks and when using together with the SSH agent it is possible to login to multiple servers without entering your credentials again and again. At IFCA it is highly reccomended to use SSH Key authentication for accessing the [[Cluster]]. We reccomend the reading of the fantastic [[https://wiki.archlinux.org/index.php/SSH_Keys|Arch Linux SSH Keys guide]] for more details. Some instructions are provided below though. == SSH Key creation == === Windows (PuTTY) === Check [[/Putty|this page]] for more information. === Linux === Check [[/Linux|this page]] for more information. == Upload key == === Using cerbero === {{{#!wiki caution Note that this method will only work for Scientific Linux 6 machines. }}} 1. Login to https://cerbero.ifca.es {{attachment:01.png||width=800}} 2. Click `POSIX` in order to edit your POSIX settings. {{attachment:02.png||width=800}} 3. Click `Edit` button. {{attachment:03.png||width=800}} 4. Click `Edit public ssh keys...` button. {{attachment:04.png||width=800}} 5. From this screen you can manage the the public SSH keys that you have added to your account. You can have several keys (for example, one for the office PC, another, for your laptop, etc.). Click `Browse` to select the file of your public key and upload it to the server. {{attachment:05.png||width=800}} 6. Search the file containing your public key and upload it. {{attachment:06.png||width=800}} 7. Click `Upload` and your public key will be added. {{attachment:07.png||width=800}} 8. You're almost done, your key has been added. Click `Save` to accept the changes. {{attachment:08.png||width=800}} 9. Click `OK` and now you will be able to login using your SSH key. {{attachment:09.png||width=800}} === Using the authorized_keys file === Another alternative is to SSH to the machine where you want to use your public key and add the contents of your public key file to the `.ssh/authorized_keys` file. You can add it with the following command: {{{ $ ssh-copy-id username@gridui.ifca.es }}}