You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The basic instructions are coming from `How to Generate and Configure SSH Certificate-based Authentication <https://goteleport.com/blog/how-to-configure-ssh-certificate-based-authentication>`_
6
+
7
+
Information on using a yubikey for the CA can be found at https://gist.github.com/jamesog/b156c7a85e7f95046ca8b95f6f857f70
8
+
9
+
Complicated PKI stuff.
10
+
11
+
* blah blah host signing key pair
12
+
* user signing key pair
13
+
14
+
create the CA keypair
15
+
^^^^^^^^^^^^^^^^^^^^^
16
+
17
+
The first set will be for signing host keys.
18
+
19
+
* ~~I do not know if it requires the `rsa` type, but I want to find out.~~ `rsa` is not required, better keys work
20
+
* `-C host_ca` is a comment, and I think that's weak sauce.
21
+
* If `rsa` keys are used, make sure to use a bigger keysize like `-b 4096`
22
+
23
+
.. code-block:: console
24
+
25
+
ssh-keygen -t ed25519 -f host_ca -C host_ca
26
+
27
+
And the pair for signing the user certs:
28
+
29
+
.. code-block:: console
30
+
31
+
ssh-keygen -t ed25519 -f user_ca -C user_ca
32
+
33
+
create a host key and sign it
34
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35
+
36
+
Generate the key with `ssh-keygen`:
37
+
38
+
.. code-block:: console
39
+
40
+
ssh-keygen -f ssh_host_key -N '' -t ed25519
41
+
42
+
And finally sign it.
43
+
44
+
* `-I hostname` is the certificate's identity, using the hostname makes management easier
45
+
* `-n hostname` is a comma-separated list of principals that will be valid, FQDN and/or short names that you'll be using are the proper values
46
+
* `-V +52w` is the validity period, in thie case 52 weeks, if unset they will be valid forever
Copy file name to clipboardExpand all lines: elk/elastic/index.html
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,7 @@ <h1>elasticsearch<a class="headerlink" href="#elasticsearch" title="Link to this
70
70
<liclass="toctree-l2"><aclass="reference internal" href="shards.html#get-all-shards">get all shards</a></li>
71
71
<liclass="toctree-l2"><aclass="reference internal" href="shards.html#get-cluster-shard-status-along-with-curent-health">get cluster shard status along with curent health</a></li>
72
72
<liclass="toctree-l2"><aclass="reference internal" href="shards.html#increase-the-number-of-shards-that-can-be-in-the-relocating-state">increase the number of shards that can be in the relocating state</a></li>
73
+
<liclass="toctree-l2"><aclass="reference internal" href="shards.html#see-the-max-shards-per-node">see the max shards per node</a></li>
<liclass="toctree-l2"><aclass="reference internal" href="openssh/misc.html">Disconnect from an SSH session</a></li>
75
76
<liclass="toctree-l2"><aclass="reference internal" href="openssh/misc.html#disconnect-from-a-nested-ssh-session">Disconnect from a nested SSH session</a></li>
76
77
<liclass="toctree-l2"><aclass="reference internal" href="openssh/misc.html#x11-forwarding-not-working">X11 forwarding not working</a></li>
<h1>certificate authentication<aclass="headerlink" href="#certificate-authentication" title="Link to this heading">¶</a></h1>
38
+
<p>The basic instructions are coming from <aclass="reference external" href="https://goteleport.com/blog/how-to-configure-ssh-certificate-based-authentication">How to Generate and Configure SSH Certificate-based Authentication</a></p>
39
+
<p>Information on using a yubikey for the CA can be found at <aclass="reference external" href="https://gist.github.com/jamesog/b156c7a85e7f95046ca8b95f6f857f70">https://gist.github.com/jamesog/b156c7a85e7f95046ca8b95f6f857f70</a></p>
40
+
<p>Complicated PKI stuff.</p>
41
+
<ulclass="simple">
42
+
<li><p>blah blah host signing key pair</p></li>
43
+
<li><p>user signing key pair</p></li>
44
+
</ul>
45
+
<sectionid="create-the-ca-keypair">
46
+
<h2>create the CA keypair<aclass="headerlink" href="#create-the-ca-keypair" title="Link to this heading">¶</a></h2>
47
+
<p>The first set will be for signing host keys.</p>
48
+
<ulclass="simple">
49
+
<li><p>~~I do not know if it requires the <cite>rsa</cite> type, but I want to find out.~~ <cite>rsa</cite> is not required, better keys work</p></li>
50
+
<li><p><cite>-C host_ca</cite> is a comment, and I think that’s weak sauce.</p></li>
51
+
<li><p>If <cite>rsa</cite> keys are used, make sure to use a bigger keysize like <cite>-b 4096</cite></p></li>
<li><p><cite>-I hostname</cite> is the certificate’s identity, using the hostname makes management easier</p></li>
70
+
<li><p><cite>-n hostname</cite> is a comma-separated list of principals that will be valid, FQDN and/or short names that you’ll be using are the proper values</p></li>
71
+
<li><p><cite>-V +52w</cite> is the validity period, in thie case 52 weeks, if unset they will be valid forever</p></li>
<h2>check the options that a key was signed with<aclass="headerlink" href="#check-the-options-that-a-key-was-signed-with" title="Link to this heading">¶</a></h2>
<h2>add the user_ca.pub file to the server’s sshd_config<aclass="headerlink" href="#add-the-user-ca-pub-file-to-the-server-s-sshd-config" title="Link to this heading">¶</a></h2>
113
+
<p>Add the following to the <cite>/etc/sshd_config</cite>:</p>
<liclass="toctree-l2"><aclass="reference internal" href="misc.html">Disconnect from an SSH session</a></li>
150
+
<liclass="toctree-l2"><aclass="reference internal" href="misc.html#disconnect-from-a-nested-ssh-session">Disconnect from a nested SSH session</a></li>
151
+
<liclass="toctree-l2"><aclass="reference internal" href="misc.html#x11-forwarding-not-working">X11 forwarding not working</a></li>
152
+
<liclass="toctree-l2"><aclass="reference internal" href="misc.html#get-a-fingerprint-from-a-public-key-in-your-known-hosts-file">get a fingerprint from a public key in your known_hosts file</a></li>
153
+
<liclass="toctree-l2"><aclass="reference internal" href="sftp.html">message too long</a></li>
0 commit comments