How To Setup Yubikey SSH On Fedora

Here is a short ten minute video tutorial and howto directions. This is how to setup Yubikey authentication on Red Hat Fedora with PAM authentication. You can configure SSH to restrict access to your Linux box so that only Yubikeys you authorize can gain access. Therefore restricting access to anyone who does not.


# build libyubikey
wget http://yubico-c.googlecode.com/files/libyubikey-1.1.tar.gz
tar -zxf libyubikey-1.1.tar.gz
cd libyubikey-1.1
./configure
make
make install
cd ../

# build pam yubikey
wget http://yubico-pam.googlecode.com/files/pam_yubico-1.8.tar.gz
tar -zxf pam_yubico-1.8.tar.gz
cd pam_yubico-1.8
./configure
make
make install
cp libs/pam_yubico.so /lib/security/

# Setup keyfile
mkdir /root/.yubico/
vi /root/.yubico/authorized_yubikeys
root:{12char key}

# SSHD Config
PasswordAuthentication yes
ChallengeResponseAuthentication yes
UsePAM yes

# Pam module
vi /etc/pam.d/sshd
auth sufficient pam_yubico.so id=16 debug

7 Responses to “How To Setup Yubikey SSH On Fedora”


  1. 1 Jackie

    Is that the same or similar to set up SSH for Yubikey on Debian or other Linuxes?

    Thanks

  2. 2 Alex Barger

    I’m working on a debian/ubuntu howto. Hope to finish that up soon. Most systems should be very similar.

    -A

  3. 3 Posh Post Reviews

    hi!

    i am overhauling my blog. please respond here if u still want to be in my blogroll on or before nov. 22. thanks! :D

    http://poshpost.blogspot.com/2008/11/if-you-want-to-remain-in-blog-roll.html

  4. 4 Posh Post Reviews

    hi alex!
    pls vote here and i will publish your link : http://poshpost.blogspot.com/2008/11/who-will-win-in-dream-match.html

  5. 5 Posh Post Reviews

    Hi alex!

    if you have time, pls respond here and I will publish you choice and your link. http://poshpost.blogspot.com/2008/11/do-you-think-that-angelina-jolie.html

    thanks! :D

    ps.
    you haven’t been visiting back my blog….

  6. 6 Luis

    Please could you upload a better quality video?

  7. 7 Alex Barger

    I don’t know if I still have the recording or not – Google video compressed it. You can follow along with the text instructions. As well as there are other tutorials here: http://code.google.com/p/yubico-pam/wiki/YubikeyAndSSHViaPAM

Comments are currently closed.