master
Raw Download raw file

layout: post title: “Yubikey and SSH” date: 2012-04-29 21:54 categories: Yubikey SSH keywords: “Yubikey, SSH, authentication” comments: true published: false

{% img http://www.yubico.com/wp-content/uploads/2012/09/YubiKey_body-602x412.png?119b56 640 412 YubiKEYAuth %}

Target OS: Ubuntu 12.04 LTS

##Install dependencies

sudo apt-get install libpam-yubico
sudo apt-get install libyklient-dev

##Create yubikeyID authorized keys file

yubikeyid-gen <yubikey OTP> > /etc/yubikeyid

where yuikeyid-gen is these simple bash lines

#!/usr/bin/env bash
echo -n `whoami`
echo -n ":"
echo -n $1 | cut -c 1-12

Your file should look like this

<user>:<YubiKEY ID>