Ssh keys

From HPC Wiki
Revision as of 15:02, 5 April 2018 by Ds019135 (talk | contribs) (Created page with "An ssh key is a way of identifying (authenticating) yourself when connecting to a server per ssh. A different popular authentication method is via a password. == Why shou...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

An ssh key is a way of identifying (authenticating) yourself when connecting to a server per ssh. A different popular authentication method is via a password.

Why should I use it?

When you connect to a server, authenticating via a password there are two main problems:

  • Someone could intercept/crack your password, since it has to be send to the server at some point in some form.
  • Someone could bruteforce or guess the password, since many passwords are commonly weak, hard to remember or used for multiple applications and then cracked/leaked.

How-to-use-it

You should start by generating a key pair:

$ ssh-keygen -b 4096

where you can specify the max length of the key up to 16384 bits.

You can then optionally protect your key with a passphrase. (Your key is basically just a file sitting on your computer and a passphrase protects your key, if someone happens to steal/copy that file).

If you did not specify a different file, the key normaly gets generated to


how-it-works