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:27] – michel | wiki:yubikey [2024/03/01 13:56] (current) – michel | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ====SSH==== | ====SSH==== | ||
| + | ===hira==== | ||
| + | < | ||
| + | .ssh | ||
| + | |-- authorized_keys | ||
| + | |-- conf.d | ||
| + | | |-- hetzner.conf | ||
| + | | |-- hollandpark.conf | ||
| + | | |-- nsas.conf | ||
| + | | |-- other.conf | ||
| + | | `-- swissbit.conf | ||
| + | |-- config | ||
| + | |-- id_ecdsa_sk -> keys/ | ||
| + | |-- 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 -> keys/ | ||
| + | |-- id_ed25519.pub -> keys/ | ||
| + | |-- id_ed25519_nsas -> keys/ | ||
| + | |-- id_ed25519_nsas.pub -> keys/ | ||
| + | |-- id_ed25519_sk -> keys/ | ||
| + | |-- id_ed25519_sk.pub -> keys/ | ||
| + | |-- id_rsa -> keys/ | ||
| + | |-- id_rsa.pub -> keys/ | ||
| + | |-- keys | ||
| + | | |-- hollandpark | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | |-- josephs | ||
| + | | | ||
| + | | | ||
| + | | |-- michel | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | |-- nsas | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | |-- old | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | |-- schraubenscholz | ||
| + | | | ||
| + | | | ||
| + | | |-- swissbit | ||
| + | | | ||
| + | | | ||
| + | | `-- 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=== | ||
| Recomendation: | Recomendation: | ||
| Line 14: | Line 135: | ||
| 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 ~/ | ||
| + | # 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 ~/ | ||
| + | no-touch-required sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIPqR3iKb9jw9IGHXXFBSPhgVVTy4tUYaQcdYmSFXjuPSAAAAFnNzaDphdXRvbWF0aW9uLm5zYXMuZGU= Michel | ||
| + | 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/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===Listing key on a Yubikey=== | ||
| + | < | ||
| + | ===Deleting key on a Yubikey=== | ||
| + | < | ||
| + | ===Downloading keys from a Yubikey=== | ||
| + | < | ||
| + | ====TOTP==== | ||
| + | ===ykman=== | ||
| + | List < | ||
| + | Add < | ||
| + | ===FIDO2=== | ||
| + | Set Pin< | ||
| + | Change Pin < | ||
| - | <file plain ~/ | ||