Jun
23
PBS 17 of X – JS Objects
Filed Under System Administration, Computers & Tech on June 23, 2016 | 4 Comments
At this stage in the series we have made very good progress towards understanding the core JavaScript language. However, there is still one very important piece missing – objects. We have mentioned them in passing in almost every instalment, and each time, we put them off until later. We finally remedy that in this instalment.
Dec
15
hsxkpasswd
Without sudo
(with perlbrew
)
Filed Under System Administration, My Projects, Security, Computers & Tech on December 15, 2015 | 2 Comments
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
Sep
6
Using the hsxkpasswd
Terminal Command (Part 2 of 2)
Filed Under Computers & Tech, System Administration, My Projects, Security on September 6, 2015 | 6 Comments
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.
Aug
22
Using the hsxkpasswd
Terminal Command (Part 1 of 2)
Filed Under System Administration, My Projects, Security, Computers & Tech on August 22, 2015 | 8 Comments
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$
Aug
8
Uninstalling a Crypt::HSXKPasswd
Beta
Filed Under System Administration, My Projects, Computers & Tech on August 8, 2015 | 2 Comments
Firstly, thanks to everyone who runs beta versions of Crypt::HSXKPasswd
– every bug you find makes the software that little bit better!
However, now that the software is in CPAN, many of you may well want to move away from the stand-alone beta releases, and start getting the module directly from CPAN. Before you install the module from CPAN, you should remove the beta from your system. You can do that in two easy steps:
- Install
pm-uninstall
from CPAN:sudo cpan App::pmuninstall
- Use
pm-uninstall
to remove the beta version ofCrypt::HSXKPasswd
:sudo pm-uninstall Crypt::HSXKPasswd
Jul
5
TTT Part 35 of n – HTTP Commands
Filed Under System Administration, Computers & Tech on July 5, 2015 | 6 Comments
The previous instalment we introduced the HTTP protocol. In this instalment we’ll look at three terminal commands which make use of the HTTP protocol.
We’ll start by browsing from the terminal, and then move on to a pair of very similar commands for making HTTP requests from the terminal. These two commands can do many things, but we’ll focus on two specific use-cases, downloading files, and viewing HTTP headers.
May
9
TTT Part 34 of n – Introducing HTTP
Filed Under System Administration, Software Development, Computers & Tech on May 9, 2015 | 2 Comments
In the previous instalment we finished a five-part series on SSH. Before moving on, lets take a moment to step back and look at the big-picture. The five SSH instalments are all part of the now long-running series on networking. We have been working our way through the networking stack since instalment 23. We started at the bottom of the stack, and have worked our way up. We are not exploring protocols in the Application Layer.
In this instalment we’re moving on from SSH to HTTP, the protocol that powers the world wide web.
Before we look at some HTTP-related terminal commands, we need a basic understanding of how HTTP works, so that’s what this instalment is all about.
Apr
25
TTT Part 33 of n – SSH ‘Bookmarks’
Filed Under System Administration, Security, Computers & Tech on April 25, 2015 | 3 Comments
This 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.
Apr
6
TTT Part 32 of n – SSH Tunnelling
Filed Under System Administration, Security, Computers & Tech on April 6, 2015 | 3 Comments
This is the fourth 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, and how to add both security and convenience to both those operations with SSH key pairs.
As we saw in the previous instalment, SSH’s ability to provide a secure connection between two computers can be used in many different ways. In this instalment we’ll learn about three more ways to encapsulate other network traffic within an SSH connection, adding encryption to that traffic.
Running commands and copying files are the kinds of things most people do, so the three SSH instalments to date have been quite generally applicable. That is not the case for this instalment. The three SSH features we’ll be discussing are all very useful to those who need them, but only a minority will have a use for any one of these features. However, even if you don’t need these features today, I would argue that it’s good to know these features exist, because they could well solve a problem you’ll have in the future.
There will be illustrations of the uses for these technologies, but not commands you type into your terminal to play along at home. That makes this an unusual instalment, but I hope you will still find it worthwhile.
Apr
4
TTT Part 31 of n – SSH File Transfers
Filed Under System Administration, Computers & Tech on April 4, 2015 | 5 Comments
In Part 29 of n we learned how to use SSH to execute commands on a remote computer. In the previous instalment we learned how to add security and convenience to SSH connections using SSH key-pairs.
The most important thing SSH provides is an encrypted connection between two computers. As we’ve seen, that encrypted connection can be used to securely issue terminal commands to a remote computer, but that same secured channel can also be used to secure other network connections between computers. In this instalment we’ll look at three different ways of securely copying files between computers through an SSH connection, and in the next instalment we’ll look at tunnelling just about any network connection through an SSH connection.