This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| wiki:yubikey [2023/06/08 09:59] – michel | wiki:yubikey [2024/03/01 13:56] (current) – michel | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ===hira==== | ===hira==== | ||
| < | < | ||
| - | ~/.ssh | + | .ssh |
| - | ├── | + | |-- authorized_keys |
| - | ├── config | + | |-- conf.d |
| - | ├── | + | | |-- hetzner.conf |
| - | │ ├── | + | | |
| - | │ └── | + | | |-- nsas.conf |
| - | ├── | + | | |-- other.conf |
| - | ├── | + | | `-- swissbit.conf |
| - | ├── | + | |-- config |
| - | ├── known_hosts | + | |-- id_ecdsa_sk -> keys/ |
| - | ├── known_hosts.old | + | |-- id_ecdsa_sk-NSAS -> keys/ |
| - | ├── | + | |-- id_ecdsa_sk-NSAS.pub -> keys/ |
| - | │ ├── | + | |-- id_ecdsa_sk-swissbit -> keys/ |
| - | │ ├── | + | |-- id_ecdsa_sk-swissbit.pub -> keys/ |
| - | │ ├── | + | |-- id_ecdsa_sk.pub -> keys/ |
| - | │ ├── | + | |-- id_ed25519 |
| - | │ ├── | + | |-- id_ed25519.pub -> keys/ |
| - | │ ├── | + | |-- id_ed25519_nsas -> keys/ |
| - | │ ├── | + | |-- id_ed25519_nsas.pub -> keys/ |
| - | │ ├── | + | |-- id_ed25519_sk -> keys/michel/ |
| - | │ ├── | + | |-- id_ed25519_sk.pub -> keys/michel/ |
| - | │ └── | + | |-- id_rsa -> keys/ |
| - | ├── | + | |-- id_rsa.pub -> keys/ |
| - | │ ├── | + | |-- keys |
| - | │ ├── | + | | |-- hollandpark |
| - | │ ├── | + | | |
| - | │ └── | + | | |
| - | ├── | + | | |
| - | │ ├── | + | | |
| - | │ └── | + | | |
| - | ├── schraubenscholz | + | | |
| - | ├── sockets | + | | |
| - | │ └── michel@10.0.3.13:22 | + | | |
| - | ├── | + | | |
| - | │ ├── | + | | |
| - | │ └── | + | | |
| - | └── test | + | | |
| - | + | | | |
| - | 10 directories, | + | | |
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | |-- schraubenscholz | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | `-- xecuro | ||
| + | | |-- id_ed25519_sk_rk_YKc-xecuro | ||
| + | | `-- id_ed25519_sk_rk_YKc-xecuro.pub | ||
| + | |-- known_hosts | ||
| + | |-- known_hosts.old | ||
| + | |-- old | ||
| + | | |-- known_hosts | ||
| + | | `-- known_hosts.old | ||
| + | |-- scripts | ||
| + | | `-- sshfpgen | ||
| + | |-- sockets | ||
| + | `-- test | ||
| </ | </ | ||
| + | |||
| + | <file plain ~/ | ||
| + | # | ||
| + | # Global | ||
| + | # | ||
| + | include ~/ | ||
| + | include ~/ | ||
| + | include ~/ | ||
| + | include ~/ | ||
| + | include ~/ | ||
| + | # | ||
| + | # Global | ||
| + | # | ||
| + | Host * | ||
| + | LogLevel QUIET | ||
| + | ControlMaster auto | ||
| + | ControlPath ~/ | ||
| + | ControlPersist yes # keep connections open indefinitely, | ||
| + | ForwardAgent yes # ssh -A host # on the command line | ||
| + | VerifyHostKeyDNS no # Specifies whether to verify the remote key using DNS and SSHFP | ||
| + | AddKeysToAgent yes | ||
| + | TCPKeepAlive yes | ||
| + | Compression yes | ||
| + | StrictHostKeyChecking no | ||
| + | VersionAddendum none | ||
| + | UpdateHostKeys yes | ||
| + | # IdentitiesOnly yes | ||
| + | PreferredAuthentications publickey, | ||
| + | # HostKeyAlgorithms +ssh-rsa | ||
| + | # PubkeyAcceptedKeyTypes +ssh-rsa | ||
| + | # Ensure KnownHosts are unreadable if leaked - it is otherwise easier to know which hosts your keys have access to. | ||
| + | HashKnownHosts yes | ||
| + | # Host keys the client accepts - order here is honored by OpenSSH | ||
| + | HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com, | ||
| + | KexAlgorithms curve25519-sha256@libssh.org, | ||
| + | MACs hmac-sha2-512-etm@openssh.com, | ||
| + | Ciphers chacha20-poly1305@openssh.com, | ||
| + | </ | ||
| ===Generating key with a yubikey=== | ===Generating key with a yubikey=== | ||
| Line 56: | Line 134: | ||
| < | < | ||
| This key requires the presens of the Yubikey, but does not need to be touched. (authorized_keys) need the __no-touch-required__ in front of the public key. | This key requires the presens of the Yubikey, but does not need to be touched. (authorized_keys) need the __no-touch-required__ in front of the public key. | ||
| + | |||
| + | <file plain ~/ | ||
| <file plain ~/ | <file plain ~/ | ||
| - | no-touch-required sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIEawzv7L8w9eetH03oc8XHuc02gX/ | + | # Michel |
| + | no-touch-required sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIEawzv7L8w9eetH03oc8XHuc02gX/ | ||
| + | sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIEvFa/ | ||
| + | sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIJ2Za0UMRtm+LwEGEmug1QNoBEoV/ | ||
| + | # NSAS | ||
| + | sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIDp7SK9FxZJUQW+jz2ciChN7SwT6SdmovhLUlBLzhIkRAAAADHNzaDpZS2MtTlNBUw== NSAS - Network System Access Solutions | ||
| + | sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBPneb67QG6/ | ||
| </ | </ | ||
| + | === Hollandpark === | ||
| <file plain ~/ | <file plain ~/ | ||
| - | no-touch-required sk-ssh-ed25519@openssh.com | + | no-touch-required sk-ssh-ed25519@openssh.com |
| + | no-touch-required sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAILgcVrlj1obmOQVHS29DlJttRuKovDbyjzeWjPBgtd0pAAAAEnNzaDpZS2MtS29lbmlnLW5kYw== Danny | ||
| + | no-touch-required sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIJtU9G6KM0eWrNBdzuCoFyhPMRsdXHwIzbLyqQIMLwtnAAAAEHNzaDpZS2MtYmFuay1uZGM= Bank | ||
| + | no-touch-required sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIIkqDyKEdyAFTL6M9J8/xjMn6MqUzxuw3r7y79Q8DMGHAAAAEHNzaDpZS2MtVGhlby1uZGM= Theo | ||
| </ | </ | ||
| + | |||
| ===Listing key on a Yubikey=== | ===Listing key on a Yubikey=== | ||
| Line 76: | Line 167: | ||
| List < | List < | ||
| Add < | Add < | ||
| + | |||
| + | ===FIDO2=== | ||
| + | Set Pin< | ||
| + | Change Pin < | ||