Translations:SSH Keys/48/en

From Alliance Doc
Jump to navigation Jump to search

When you generate a key, the default settings are usually sufficient. However, here are a few options which may be of interest. We demonstrate these options here using ssh-keygen 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.

  • You can specify a comment for the key, which may be helpful if you have multiple keys.
ssh-keygen -C 'Alliance systems'
  • You can also choose the name of the key file.
ssh-keygen -f alliance-key

This produces a file alliance-key containing the private part, and alliance-key.pub for the public part. If you do this, though, you may have to use the -i option to specify the name of the key when logging in, like this: ssh -i alliance-key user@host

  • 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