Details

This time on the show, using One-Time-Passwords in Linux for SSH authentication. We cover the theory and set up our server with a Yubikey. Plus, relay'ing without GatewayPorts, easily edit Known_Hosts, Free SSHFS in Windows and a ton more, this time on Hak5!

Download HD | Download MP4

First and foremost, mad props to Matt Levavi who scoured forums and mailing lists to compile a simple how to. Here's the jist of setting up SSHD in Ubuntu to use authentication with a Yubikey.

mkdir ~/.yubico
sudo aptitude install autoconf libtool libusb-1.0-0-dev libcurl4-openssl-dev libpam-dev
# Download Yubico-pam, Yubico-c-client, Libyubikey and Yubikey-personalization
sudo autoreconf --install; ./configure; make; make install # in each directory with Yubico-pam being last
# Get an API key and passwd from https://upgrade.yubico.com/getapikey/
sudo vi /etc/pam.d/sshd # Find PAM configuration and add:
auth required pam_yubico.so id= key= debug
sudo vi /etc/pam.d/common-auth
# add "debug try_first_pass" to end of auth string
sudo vi /etc/ssh/sshd_config
# ensure PasswordAuthention yes and ChallengeResponseAuthentication no
sudo mv /usr/local/lib/security/pam_yubico.so /lib/security
sudo vi ~/yubico/authorized_yubikeys
# syntax: user:
sudo touch /var/run/pam-debug.log
chmod go+w /var/run/pam-debug.log
sudo service ssh restart

Leave a Reply

Your email address will not be published. Required fields are marked *

*

14 Comments

  • Daevien 3 years ago

    I think you may have broken Matt’s website, getting 403 error 😉

  • Great Episode!!!…
    FYI: the voting on this page (or on any page) does not work, it just says “please wait…” when you click on it. This has been broken for a long, long time on your website…
    please see if you can fix it.

  • Ashara 3 years ago

    Hi Darren & Shannon

    2 Words = That rocked!!!

    Hadoken!!!

  • james 3 years ago

    Any info on that pwdvi / pwvi program for editing the password file?

  • him1123 3 years ago

    Would like to see how to use google auth for ssh and regular login

  • James, vipw or vigr are two programs that help to manually modify the /etc/passwd and /etc/group files so that you don’t make a mistake and break your system. It performs a sanity check when exiting to make sure the file is formatted correctly.

  • What is the deal with the recent episodes of Hak5? They have become Darren pretty much conducting the episodes like a boring college lecture. It’s just him writing on the table with markers and Shannon saying “Ooooh Oookkk”. You would think the host of a Tech show would be teaching the audience… not one host boring the audience while teaching the other host! Used to be a big fan…..

  • And get off the SSH

  • And get off the SSH already…

  • And stop dropping the played-out references to shannon’s SSh Into Your Heart Song….

  • You forgot to mention in order for this to work the box you are connecting to must have internet connection to check key. Carefull guys this won’t work on a isolated box.

  • Okay, so I was watching this episode and started thinking of a way to make secure password.

    What not use time in the maths.

    like this:

    Password: 0001
    maths= x5 -4 x%time%= %password%

    time could be anything that is the current time, the date or both.

    i.e. 11:59:22 – Hours:Mintes:seconds or 05:04:2012 month:day:year or both 11:59:22:05:02:2012

    I really hate to think what that number might be, but you’d leave out the ‘:’ and just go with numbers, since the first lot would only need to be in two’s and the last would be four.

    Wait this is a stupid idea, right?

  • El virus del Ébola es entre los dos miembros de una familia de virus de ARN
    (ácido ribonucleico) llamadoFiloviridae.

  • These are just some from the few uses and effects from the garlic.
    The simple solution out of this issue is for you
    to change their eating habits, avoid overeating yourself and
    you need to avoid taking meals which might be full of fats and calories.
    There are five what exactly you need to consider to realize optimum
    health: Lose weight, balanced diet options, exercise, give up smoking and moderate alcohol consumption.

  • Why not use those coupons for getting your selected healthy
    products. Internal motivation is linked to neurological circuitry in the left prefrontal lobe; the
    feelings of accomplishment, adoration for work, excitement
    inside our day all connect to the left prefrontal cortex.
    It will need around 7-10 days to complete a cleanse and
    results may start to become noticed inside the first three days.

  • Hi there, I discovered your site by way of Google at the same time
    as searching for a comparable topic, your web site came
    up, it appears to be like good. I’ve bookmarked it in my google bookmarks.

    Hi there, just became aware of your blog through Google,
    and found that it is really informative.
    I am gonna be careful for brussels. I’ll appreciate if you proceed
    this in future. Lots of folks will probably be benefited from your writing.
    Cheers!

  • It’s difficult to find well-informed people in this particular topic, however, you sound like you know
    what you’re talking about! Thanks

  • Dieting will be the nastiest word within the world of,
    well, dieting. Now everything is a lot easier due to coming of people diet pills.

    Every time I have tried to go “all in” at the same time, I wind up losing,
    whether in Vegas or wanting to stay away from my neighbors BBQ.

  • Thank you for sharing your info. I truly appreciate your efforts and I am waiting for your
    further post thank you once again.

  • Good post. I learn something new and challenging on blogs I stumbleupon everyday.
    It will always be interesting to read through articles from other writers and practice a little something from their web
    sites.

  • Why viewers still make use of to read news papers when in this technological globe everything is available on web?

  • This post gives clear idea for the new viewers of blogging, that really
    how to do running a blog.

  • Nice post. I was checking continuously this blog and I am
    impressed! Very helpful info specially the last part
    :) I care for such info a lot. I was looking for this particular information for a long time.

    Thank you and good luck.

  • Hi there! I know this is sort of off-topic but I had to ask.
    Does managing a well-established website like yours take a massive amount work?
    I am brand new to running a blog but I do write in my journal daily.
    I’d like to start a blog so I will be able to
    share my own experience and thoughts online. Please let me know if
    you have any recommendations or tips for brand new aspiring
    bloggers. Appreciate it!