SSH Keys: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Marked this version for translation)
No edit summary
Line 131: Line 131:


== Options for key generation == <!--T:35-->
== Options for key generation == <!--T:35-->
ssh-keygen shown above is using defaults, which are OK, but may not be ideal.   
When you generate a key the default settings are usually sufficient.  However, here are a few options which may be of interestWe demonstrate these options here using <code>ssh-keygen</code> as described in [[Using SSH keys in Linux]], but the same options are available if you are using a graphical interface as described in [[Generating SSH keys in Windows]].
for instance:
* You can specify a comment for the key, which may be helpful if you have multiple keys:
* many people prefer a different key type (rather than the RSA default):
ssh-keygen -t ed25519
* you can specify a comment for the key, which may be convenient for distinguishing among multiple keys:
  ssh-keygen -C 'computecanada systems'
  ssh-keygen -C 'computecanada systems'
* you can choose the name of the key file:
* You can choose the name of the key file:
  ssh-keygen -F computecanada-key
  ssh-keygen -F computecanada-key
(this produces a file "computecanada-key" containing the private part, and "computecanada-key.pub" for the public part.
This produces a file "computecanada-key" containing the private part, and "computecanada-key.pub" for the public part.
* you can choose longer keys for some key types such as RSA:
* There are sometimes reasons to choose a different key type (rather than the RSA default):
ssh-keygen -t ed25519
* You can strengthen certain key types, such as RSA, by setting a longer key length:
  ssh-keygen -t rsa -b 4096
  ssh-keygen -t rsa -b 4096


Bureaucrats, cc_docs_admin, cc_staff
2,879

edits

Navigation menu