Code Monkey home page Code Monkey logo

hsk's Introduction

hsklogin

The hsklogin script uses the macOS ssh-agent with the yubikey, so that you don't have to type in the PIN for every git pull.

Prerequirements

Set up your yubikey for github SSH and test that it works correctly.

Installing

git clone https://github.com/mrszymon/hsk
cd hsk
sudo cp hsklogin /usr/local/bin
chmod u+x /usr/local/bin/hsklogin

Usage

hsklogin -h

Further information

You will be prompted for your yubikey PIN:

  • if keys are not installed
  • if installed keys have expired
  • following a reboot

hsklogin can be executed multiple times. Keys are replaced on each execution.

The script performs the following steps:

  • ssh-add -e /usr/local/lib/libykcs11.dylib
    • removes any existing keys, with a specified duration (in seconds)
  • ssh-add -s /usr/local/lib/libykcs11.dylib -t $life
    • prompts for your Yubikey PIN
    • adds Yubikey keys
  • ssh-add -l
    • lists the installed keys

For more information, see man ssh-add.

hsk's People

Contributors

mrszymon avatar szymonpriv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.