Skip to content

Commit 5e7b535

Browse files
ABuljkodaringer
authored andcommitted
Docs: update SSH Authentication (ssh.rst)
1 parent f4cc896 commit 5e7b535

File tree

1 file changed

+21
-24
lines changed
  • source/components/nitrokeys/features/fido2

1 file changed

+21
-24
lines changed

source/components/nitrokeys/features/fido2/ssh.rst

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -55,37 +55,34 @@ Generating SSH Key
5555
Adding Your Public Key
5656
----------------------
5757

58-
Once your SSH key pair is generated, the public key must be added to the service or server you want to access.
58+
1. Once your SSH key pair is generated, the public key must be added to the service or server you want to access.
5959

60-
**For Git Services (GitLab, GitHub, etc.)**
61-
1. Display your public key:
60+
1.For Git Services (GitLab, GitHub, etc.)
61+
1. Display your public key:
6262

63-
.. code-block:: shell-session
64-
65-
cat ~/.ssh/id_ed25519_sk.pub
63+
.. code-block:: shell-session
6664
67-
Example output (do not use this key)::
68-
69-
[email protected] AAAAGnNrLXNzaC1lZDI1NTE5QG7wZW4zc2guY29tAAAAILeZl6r07HV4i1rK07OfLqD3J4IzX2q0lB6Ok0pdxoG5AAAABHNzaDo= your_comment
65+
cat ~/.ssh/id_ed25519_sk.pub
7066
71-
2. Copy the output and add it to your account’s SSH key settings.
72-
See `GitLab <https://docs.gitlab.com/user/ssh/#add-an-ssh-key-to-your-gitlab-account>` or `GitHub <https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account>` for detailed steps.
67+
Example output (do not use this key)::
68+
69+
[email protected] AAAAGnNrLXNzaC1lZDI1NTE5QG7wZW4zc2guY29tAAAAILeZl6r07HV4i1rK07OfLqD3J4IzX2q0lB6Ok0pdxoG5AAAABHNzaDo= your_comment
7370

71+
2. Copy the output and add it to your account’s SSH key settings.
72+
See `GitLab <https://docs.gitlab.com/user/ssh/#add-an-ssh-key-to-your-gitlab-account>` or `GitHub <https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account>` for detailed steps.
7473

75-
**For Remote Servers**
76-
To allow SSH access, the same public key must be listed in the server’s ``~/.ssh/authorized_keys`` file.
77-
During authentication, the server checks for a matching key and verifies your identity through a challenge signed by your Nitrokey’s private key.
7874

79-
To add your key:
75+
2. To allow SSH access to the remote servers, the same public key must be listed in the server’s ``~/.ssh/authorized_keys`` file. During authentication, the server checks for a matching key and verifies your identity through a challenge signed by your Nitrokey’s private key.
76+
To add your key:
8077

81-
.. code-block:: shell-session
78+
.. code-block:: shell-session
8279
83-
mkdir -p ~/.ssh
84-
chmod 700 ~/.ssh
85-
cat ~/.ssh/id_ed25519_sk.pub >> ~/.ssh/authorized_keys
86-
chmod 600 ~/.ssh/authorized_keys
80+
mkdir -p ~/.ssh
81+
chmod 700 ~/.ssh
82+
cat ~/.ssh/id_ed25519_sk.pub >> ~/.ssh/authorized_keys
83+
chmod 600 ~/.ssh/authorized_keys
8784
88-
Each line in ``authorized_keys`` represents one trusted key.
89-
90-
You can add multiple keys or restrict usage, for example to a specific IP range and command:
91-
from="192.168.0.*" command="/usr/local/bin/backup.sh" [email protected] AAAAGnNrLXNzaC1lZDI1NTE5QG7wZW4zc2guY29tAAAAILeZl6r07HV4i1rK07OfLqD3J4IzX2q0lB6Ok0pdxoG5AAAABHNzaDo= your_comment
85+
Each line in ``authorized_keys`` represents one trusted key.
86+
87+
You can add multiple keys or restrict usage, for example to a specific IP range and command:
88+
from="192.168.0.*" command="/usr/local/bin/backup.sh" [email protected] AAAAGnNrLXNzaC1lZDI1NTE5QG7wZW4zc2guY29tAAAAILeZl6r07HV4i1rK07OfLqD3J4IzX2q0lB6Ok0pdxoG5AAAABHNzaDo= your_comment

0 commit comments

Comments
 (0)