These are my slides from a talk I delivered to the CT Mac Connection Mac Users Group (MUG) on the 30th of March 2016.

IoT Talk Front Page
Click to View Slides

A PDF version can be downloaded from here.

Tagged with:

While it’s very easy to install hsxkpasswd onto your system from CPAN – it’s literally just one command (see below) – it requires administrator access to the machine.

sudo cpan Crypt::HSXKPasswd

This is all well and good if you have administrator access and are sure you want the module installed system-wide. But, what if you don’t have admin access, or, what if you just want to experiment with the module in your own home directory? The answer is perlbrew, a system for running custom versions of Perl inside your home directory. No need for sudo, and what ever you install with perlbrew is entirely contained within your home directory. If you already have perlbrew installed and configured with a version of Perl greater than or equal to 5.16, you can skip to the final step. If not, you’ll need to make your way through all the steps.

Step 1 – Install perlbrew Into Your Home Dir

There are a few different ways of installing perlbrew, but I find the following method the simplest:

curl -L http://install.perlbrew.pl | bash

That should install perlbrew into your home directory, and it should tell you to append some code to the end of your ~/.bash_profile file, which you can do with the following command:

echo 'source ~/perl5/perlbrew/etc/bashrc' >> ~/.bash_profile

Once that’s done, close your Terminal window and open a new one (this is to pick up the new environment variables defined in ~/perl5/perlbrew/etc/bashrc). You’ll know the install has been successful if you can run the perlbrew command:

perlbrew version

Step 2 – Install a Compatible Version of Perl into perlbrew

The joy of perlbrew is that you can have as many versions of Perl installed at any one time as you like, and you can then switch between them with the perlbrew command.

You can install Crypt::HSXKpasswd, and hence the hsxkpasswd terminal command, into any version of Perl greater than or equal to 5.16.

The following command will install Perl 5.16 into perlbrew:

perlbrew install perl-5.16.0

Go off and make yourself a cup of your favourite beverage – this will take a while! 🙂

Once the install finally finishes, you can activate that version of perl (just on your account) with the command:

perlbrew switch perl-5.16.0

It’s important to note that if at any stage you want to disable perlbrew and get back to the default system version of perl, the command to do so is:

perlbrew off

Step 3 – Enable the perlbrew CPAN Client

If you haven’t already done so, enable the perlbrew CPAN client cpanm with the command:

perlbrew install-cpanm

Step 4 – Install Crypt::HSXKPasswd

Once you have perlbrew installed and configured with a compatible version of perl, you can install Crypt::HSXKPasswd with the following simple command:

cpanm Crypt::HSXKPasswd

You’ll know it’s worked if you can run the hsxkpasswd terminal command:

hsxkpasswd --version

Tagged with:

This is the second part of a two-part post – read part 1 here.

In part 1 we learned how to use the command line too hsxkpasswd to generate passwords, and how to use various flags to specify custom password generation configurations, and word sources. In this second part we’ll look at how to save these customisations for future use with .hsxkpasswdrc files.

Read more

Tagged with:

Since version 3.5, the Crypt::HSXKPasswd password generating perl module ships with a command line interface to the password generator called hsxkpasswd. This provides a way for non-Perl programers to access the vast majority of the module’s functionality.

The easiest way to install the module, and it’s accompanying terminal command is via CPAN:

sudo cpan Crypt::HSXKPasswd

Once the module is installed, you’ll have access to the hsxkpasswd terminal command.

Getting started is simple, run the command with no arguments at all and it will generate one password using the default settings:

bart-iMac2013:~ bart$ hsxkpasswd
@@26.MEASURE.below.LIFT.95@@
bart-iMac2013:~ bart$

If you want more passwords, pass a number as an argument, and you’ll get that many passwords:

bart-iMac2013:~ bart$ hsxkpasswd 10
~~08!hole!VOWEL!then!45~~
$$49^monday^YELLOW^remember^22$$
//69-express-MONDAY-edge-54//
--42~KITCHEN~save~COLD~40--
==51%REPLY%even%AUGUST%28==
%%63&list&INSIDE&train&58%%
^^19!spain!CONGO!spain!01^^
::30@SMILED@from@PERIOD@90::
&&05%decimal%THREE%remember%80&&
..47^ROAD^dress^BERLIN^11..
bart-iMac2013:~ bart$

Read more

Tagged with:

The latest stable release of both the Crypt::HSXKPasswd perl module, and the hsxkpassd terminal command are now available through CPAN: http://search.cpan.org/perldoc?Crypt%3A%3AHSXKPasswd

The library and terminal command are bundled together, and can be installed onto Unix/Linux/Mac OS X computers in the standard CPAN way:

When this install finishes, both the terminal command and perl module will be available for use on the system, along with the documentation for both:

Even though I’ve put a lot of time an effort into creating these tools, I’ve chosen to released them entirely free of charge, and with a very liberal open-source license (BSD). If you find either the terminal command or Perl module useful, please consider making a donation below to help cover my time and costs.

If you find a bug, would like to suggest a change or improvement, or would like to contribute code to the project, please use the project’s GitHub page.

Tagged with:

Another week, another beta release of Crypt::HSXKPasswd. The fact that the betas are now coming quick and fast is indeed a sign that this code is getting very close to ready for a full release.

This latest series of changes came about because when I started work on a tutorial for using the command line app I realised some changes were needed to give a better user experience.

The headline changes are that you can now specify a dictionary file rather than a dictionary package name if you prefer, you can now specify arguments for the dictionary and RNG packages, and the file format for hsxkpasswdrc files has been updated to match these changes.

Finally, I’m still looking for help in the following areas:

  • Native German, French, Italian, Spanish, Dutch, and Portuguese speakers to sanitise the dictionary files for those languages, leaving only a few thousand common words – these dictionary files are simply too big at the moment, and they must be full of really obscure words to be this large!
  • People who are good at technical writing to help me give the documentation some spit and polish. I think all the relevant information is there, and I have run it all though a spell checker, but it could definitely do with some TLC from a copy editor!

Oh, and finally finally, if you find this module useful, please consider donating with the button below – I have literally put hundreds of hours into this code in the last few months, and given it all away for free.

*Download Beta 4 of Crypt::HSXKPasswd via GitHub*

Tagged with:

I’ve just released what I hope will be the last beta release before the first stable release of Crypt::HSXKPasswd. This release has some bug fixes, but is mostly focused on improvements, especially to the new command line interface.

Initially I had planned to make the previous beta the last one before the first stable release, but then I realised that the command line interface really does need support for a configuration file before it’s ready for prime-time, so this beta is focused around the addition of what I am calling hsxkpasswdrc files.

hsxkpasswdrc files allow custom presets to be stored for re-use, and for defaults to be set for many of the command line options, making it much easier to customise the command line interface’s behaviour.

By default the command line interface now looks for a hsxkpasswdrc file at ~/.hsxkpasswdrc. You can specify a different path with the new --rcfile option, and you can use the new --test-rcfile option to help you debug your hsxkpasswdrc files.

If you have an interest in this module, please install the beta and report any problems you find by opening issues on the project’s GitHub page. Or better still if you’re a developer, fixing the bug and sending me a pull request 🙂

Finally, I’m still looking for help in the following areas:

  • Native German, French, Italian, Spanish, Dutch, and Portuguese speakers to sanitise the dictionary files for those languages, leaving only a few thousand common words – these dictionary files are simply too big at the moment, and they must be full of really obscure words to be this large!
  • People who are good at technical writing to help me give the documentation some spit and polish. I think all the relevant information is there, and I have run it all though a spell checker, but it could definitely do with some TLC from a copy editor!

Oh, and finally finally, if you find this module useful, please consider donating with the button below – I have literally put hundreds of hours into this code in the last few months, and given it all away for free.

*Download Beta 3 of Crypt::HSXKPasswd via GitHub*

Tagged with:

Last night I released what I hope will be the last beta release Crypt::HSXKPasswd before the first release to CPAN. You can download it from the project’s GitHub page (reminder, you can get installation instructions for the beta releases here).

The head-line change is the addition of a bundled command line app, bringing all the power of Crypt::HSXKPasswd to the terminal, shell scripts, and indeed programs and scripts written in any language with the ability to shell out.

In terms of lines of code the biggest change is a complete re-write of all data validation code. The project now contains a custom type library which exactly defines what it means to be a word, letter, symbol, symbol alphabet etc.. This has made the code much more robust, and has make it a lot easier to write consistent documentation. The type library is written using Type::Tiny, and all the custom type definitions contain customised validation error message functions to give users much more helpful feedback.

With the help of Allison Sheridan from the NosillaCast Mac Podcast, the warnings and error messages issued by the module have also become a lot more human-friendly.

The test suite has also been greatly expanded, making it easier to find and fix bugs going forward.

If you have an interest in this module, please install the beta and report any problems you find by opening issues on the project’s GitHub page. Or better still if you’re a developer, fixing the bug and sending me a pull request 🙂

Finally, I’m looking for help in the following areas:

  • Native German, French, Italian, Spanish, Dutch, and Portuguese speakers to sanitise the dictionary files for those languages, leaving only a few thousand common words – these dictionary files are simply too big at the moment, and they must be full of really obscure words to be this large!
  • People who are good at technical writing to help me give the documentation some spit and polish. I think all the relevant information is there, and I have run it all though a spell checker, but it could definitely do with some TLC from a copy editor!

Oh, and finally finally, if you find this module useful, please consider donating with the button below – I have literally put hundreds of hours into this code in the last few months, and given it all away for free.

*Download Beta 2 of Crypt::HSXKPasswd via GitHub*

Tagged with:

It’s been a while since I released a new version of XKPasswd.pm, the open source Perl module that powers the secure memorable password generator at www.xkpasswd.net. The main reason for the big gap is that I needed to learn some new skills to get the code to where I wanted it to be. There were three main problems I wanted solved:

  1. To get wide adoption, the Module needs to be available via CPAN
  2. The module needs unicode support to deal with non-English languages
  3. It needs to be easy to edit and tweak a config with the www.xkpasswd.net web interface, and then use it in your scripts.

While solving those problems, I also took the opportunity to tidy up some other odds and ends in the code base. It’s not that code was broken, it just that a few parts of it had a bit of a fishy smell – it seemed like there was probably a better way to do that, and there was!

So, here’s a summary of what’s changed from the the point of view of a user of the Module:

  • The Packaging – the module has a new name, and is now packaged with Module::Build, so it’s easier to install, and ready for distribution via CPAN.
  • Unicode Support – if it’s a unicode character, you can use it while generating passwords.
  • Redesigned Word Sources – more bundled with the module, and easier to create your own.
  • Redesigned Sources of Randomness – more bundled with the module, a better default, and easier to create you own.
  • A switch to Named Arguments (in both the constructor and functional interface).

I’ve put a lot of time and effort into developing this entirely free and open source module. If you find it useful, please consider making a donation:

*Download Beta of Crypt::HSXKPasswd via GitHub*

Read more

Tagged with:

Taming the TerminalThis is the final SSH instalment. So far we’ve learned how to securely execute terminal commands on remote computers, how to securely copy files across the network using SSH, how to add both security and convenience to both those operations with SSH key pairs, and how to tunnel just about anything through SSH. In this final instalment we’ll look two approaches for creating SSH bookmarks, SSH config files, and SSH GUIs.

Read more

Tagged with:

keep looking »