Configuring SSH FIDO U2F Authentication with YubiKey

Поделиться
HTML-код
  • Опубликовано: 18 янв 2025

Комментарии • 62

  • @LAWRENCESYSTEMS
    @LAWRENCESYSTEMS  2 года назад +7

    Forum post write up
    forums.lawrencesystems.com/t/ssh-with-yubikey-fido-u2f-authentication/13024
    LearnLinuxTV YubiKey Video
    www.learnlinux.tv/setting-up-the-yubikey-on-ubuntu/
    CVE-2021-3011
    cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3011
    ninjalab.io/a-side-journey-to-titan/
    ⏱ Timestamps ⏱
    00:00 FIDO2 SSH Yubikey
    01:10 Check SSH Vestion & Yubikey Version
    02:40 install libfido2-dev
    03:18 Generating ed25519-sk keys
    05:36 Installing & Using the Keys
    07:00 Cloning Keys?

  • @cloudcultdev
    @cloudcultdev 2 года назад +59

    “Feel free to flame me in the comments for doing things as root” - now that’s a seasoned RUclipsr who knows their audience well! Great video once again, Tom!

  • @JasonsLabVideos
    @JasonsLabVideos 2 года назад

    Good video sir ! I use the UB-C version for my phone & laptops. These things are amazing & durable too !!

  • @bobtatar7972
    @bobtatar7972 Год назад +1

    Tom - thanks for the video. I think you will want to encourage viewers to use pass phrases with their hardware keys. It’s a lot easier to steal a hardware device than a passphrase, and if somebody has the device to get into your servers, they will be very glad that you did not protect it with a passphrase.

    • @jpp_vh
      @jpp_vh Год назад +1

      In fact it is better to key gen with option -O verify-required as per yubico ssh guide. So the pin code is ask everytime, the key is locked after 8 fault attempt

  • @daveemmons7312
    @daveemmons7312 2 года назад +5

    I really enjoy your videos, technical enough to make things happen with simple enough explanations that I can understand what is going on.
    I also appreciate the symbiotic relationship between you and Jay@LearnLunuxTV, most excellent and I find myself bouncing between your channels watching videos and soaking it all in.
    Thanks again!

  • @evodefense
    @evodefense Год назад

    yubikeys rock! thx for write up

  • @NicholasOrr
    @NicholasOrr 2 года назад

    Thanks for the info - this is very sensible and simple now days.
    only thing that stops me from using yubikey for constant auth is needing to plug in the device :P
    need to get a cable to move the USB ports closer to my keyboard

  • @10a3asd
    @10a3asd 2 года назад +2

    Don't these have to send a request to the Yubikey's servers each time an auth attempt is made?

  • @RzVa317
    @RzVa317 2 года назад

    Thanks for this tutorial, Tom

  • @SyberPrepper
    @SyberPrepper 2 года назад

    Great video. Thanks Tom.

  • @omfghai2u
    @omfghai2u 2 года назад +1

    A good idea to get two keys since some sites that uses fido2 only supports another key as the backup login method. (or their other backup is "less than secure")

  • @sinenomine9143
    @sinenomine9143 2 года назад +1

    4:53 You are saying that you got the private key and the pub key on your server. PS your Yubikey private key NEVER leaves the Yubikey. Bytheway thanks for your videos.

  • @WojciechMarusiak
    @WojciechMarusiak 2 года назад

    Good stuff. Thanks a lot.

  • @jessedyson5919
    @jessedyson5919 2 года назад +1

    Thank you for putting this video together. I do have one question about the ssh-keygen command. Does this command overwrite anything on the YubiKey? The reason for the question is that I have an existing YubiKey that I’m using for FIDO2 and I don’t want to break it.🙂

  • @sagarsriva
    @sagarsriva 2 года назад

    great video as always!

  • @a6ustin666
    @a6ustin666 Год назад +1

    I am kind of late 😂…. But how do I configure multiple YubiKeys (main+backups)? I just have to generate one shh key for each u2f key with a different name and thats all?

  • @craigstone4051
    @craigstone4051 2 года назад

    Lawrence. Big fan of the content. Regarding the advice "get a second key and store it in a safe deposit box" how does that work? You can't enroll the second key as a backup for a service if its locked up at a remote location. To me the second key just becomes stale from the second you enroll the first key in another service. Am I missing something?

    • @LAWRENCESYSTEMS
      @LAWRENCESYSTEMS  2 года назад +2

      If you create a second ED15519 key pair with a backup FIDO U2F key and load the second public key on each system you can use that second key to access those systems if you lose the first.

  • @evodefense
    @evodefense Год назад

    Thanks!

  • @BrianThomas
    @BrianThomas 2 года назад

    Fantastic video. Can you do the same thing with PF sense? You do a video that shows Just working with PFSENSE

  • @bardus_hobus
    @bardus_hobus 8 месяцев назад

    What if I lost the key on the client host? Is there a way to generate it back using just the hardware key?

  • @CaptZenPetabyte
    @CaptZenPetabyte 2 года назад +1

    It would be nice to have a way to do this with a USB drive in some way, but I know thats not possible because the electronics is required; maybe a raspberry pi zero or pico could do the job and then you would also have even more 'playing around' space for interesting 'active encryption response'. (just brainstorming ideas)

    • @michelangelop3923
      @michelangelop3923 2 года назад

      You could create a backup ssh-key and secure it with a password, for additional security you can encrypt the private key on the USB with a Vera crypt file.

  • @berndeckenfels
    @berndeckenfels 2 года назад

    Solokeys still lag in the cert department, seems like the project is occupied with printing dices.

  • @filupmarley
    @filupmarley 2 года назад

    Very cool Tom!

  • @steinerviana
    @steinerviana 2 года назад

    Thanks for the video. Can I use yubikey with Radius server in pfsense?

  • @simons9167
    @simons9167 2 года назад

    This method is very effective for security devices and even web page. Personally I like to use Google Authentication or Microsoft Authentication app on my phone, this way I don't have to carry e, tea items. Lawrence, do you know any good software that can integrate Authentication app with ssh or OpenVPN?

    • @OddWoz
      @OddWoz Год назад

      I needed this video. Thank you 🙏

  • @gibsonswe
    @gibsonswe 6 месяцев назад

    Does this work with nested ssh sessions? I usually ssh from my windows machine into my pop-os vm, and from there I can run tmux and ssh into my other linux servers.

  • @fremenarrakis2616
    @fremenarrakis2616 2 года назад

    hello, indeed, is not possible to clone the yubikey. if you want a method with a way to backup, you can use gpg keys for ssh: you generate the key on a secured computer, then you can backup the keys to some storage, then you transfer the keys into the yubikey, then you delete the keys in the computer. the keys are only stored in the yubikey so you can use ssh on any computer, is not possible to extract the keys from the yubikey in case its lost and to be able to ssh you just need to provide the PIN. i know is a confusing explanation but ive read this somewhere i cant remember where, maybe on the yuikey documentation. Bye

  • @shaung638
    @shaung638 Год назад

    Is there any practical difference between ecdsa-sk and ed25519-sk in this application? I can get ecdsa-sk to work with my hardware key but so far have been unsuccessful with ed25519-sk.

    • @Berieh
      @Berieh Год назад +1

      I recall there's been somebody saying on youtube that ecdsa-sk has a NSA backdoor. But you better do the research on your own.

  • @danimoosakhan
    @danimoosakhan Год назад

    Can i use multiple ed25519-sk with same Yubikey. Will it override the previous keys?

    • @jpp_vh
      @jpp_vh Год назад

      Yes with option : -O application="ssh:app1" replace app1 by what you want, depending on the key you will be able to register more app ( 25 I think on the yubikey fido2)

  • @alpachino468
    @alpachino468 8 месяцев назад +1

    I identify as an SSH key

  • @DaHaiZhu
    @DaHaiZhu 2 года назад

    This is kinda a bummer: Windows ssh (8.1) is too old as a host, and Raspberry pi ssh (7.9) as a server.

    • @d00dEEE
      @d00dEEE 2 года назад

      I use cygwin and was pleased to see 8.8 on all my Windows boxes, but then was disappointed like when I saw 7.9 on the pis and 8.0 on my Alma server.

    • @enonu
      @enonu 2 года назад +1

      Consider Ubuntu Server for your raspberry pis.

  • @CristianHeredia0
    @CristianHeredia0 2 года назад

    If I have ssh only logins and fail2ban active, is this necessary? Love my yubikeys just trying to find the right balance between security and convenience.

    • @tw3145wallenstein
      @tw3145wallenstein 2 года назад

      that is a matter of how many layers do you want to have between your server and the attacker attempting to gain access. so is having to remember and keep track of one more thing worth that extra layer of security it will provide?

    • @kriansa
      @kriansa 2 года назад +2

      Adding up to Tyler's response, this kind of protection starts to make sense when you work on a team where not everybody is as tech-savvy or concerned about security. People might use SSH keys instead of passwords, but those are still vulnerable to getting stolen in several scenarios. Adding a physical token as part of the key adds an extra layer of security so that an attacker would need more than just disk access in order to compromise your key. In the end, you have to weigh in your pros/cons for each additional layer of security.

    • @CristianHeredia0
      @CristianHeredia0 2 года назад

      @@kriansa that scenario makes sense. thanks

  • @DanielHaanpaa
    @DanielHaanpaa 2 года назад

    how do you do this on a windows client connecting to a linux server?

    • @LAWRENCESYSTEMS
      @LAWRENCESYSTEMS  2 года назад

      Might work using Windows subsystem for Linux. I didn't test.

    • @jaredbaur3725
      @jaredbaur3725 2 года назад +2

      Progress for fido2 support for openssh that comes with Windows is being tracked here: github.com/PowerShell/Win32-OpenSSH/issues/1804

  • @emanuelpersson3168
    @emanuelpersson3168 2 года назад

    Would be nice to have a Windows SSH client that support Yubikey.

    • @jako265
      @jako265 Год назад

      Putty with Kleopatra will do the trick. RSA keys

    • @jpp_vh
      @jpp_vh Год назад +1

      Putty-cac has everything integrated

    • @emanuelpersson3168
      @emanuelpersson3168 Год назад

      @@jpp_vh i will check it out! Thank you!

  • @gordonzero
    @gordonzero 2 года назад

    Any good solution for SSH U2F on Windows? my primary system is windows and most of my servers are Linux.

    • @LAWRENCESYSTEMS
      @LAWRENCESYSTEMS  2 года назад +1

      That issue is being tracked here github.com/PowerShell/Win32-OpenSSH/issues/1804

  • @philippe_demartin
    @philippe_demartin 2 года назад +1

    Would it be possible to create a kind off security token from a standart thumb drive ?
    Shure, you can mont you thumb drive, who contain your key, on you ~/.ssh folder, but is there another trick to combine both "private key" and "thumb drive residente" part of the autentification?

  • @heavy1metal
    @heavy1metal 2 года назад

    Given the _id requires the YubiKey and is useless otherwise, would you think it's safe to store the _id on something like github?

    • @LAWRENCESYSTEMS
      @LAWRENCESYSTEMS  2 года назад +3

      I would not want even half of my private key somewhere accessible, only the public one.

    • @wutzman
      @wutzman 2 года назад +1

      🙈

  • @ikkuranus
    @ikkuranus 2 года назад

    If only this could be done with the putty client in windows

  • @TechySpeaking
    @TechySpeaking 2 года назад

    First