Convert a pem file into a rsa private key

When you build a server in AWS one of the last steps is to either acknowledge that you have access to an existing pem file, or to create a new one to use when authenticating to your ec2 server.

If you want to convert that file into an rsa key that you can use in an ssh config file, you can use this handy dandy openssl command string.

openssl rsa -in somefile.pem -out id_rsa

Note: you don’t have to call the output file id_rsa, you will want to make sure that you don’t overwrite an existing id_rsa file.

Copy the id_rsa file to your .ssh directory and make sure to change permissions on the id_rsa key to read only for just your user.

chmod 400 ~/.ssh/id_rsa

Working with logical volumes (part 2)

In this post I want to cover one of the most commonly used features of lvm, extending a logical volume. If you were following along with the last post, “Working with logical volumes part 1”, then you should already have a volume group with a couple of live volumes attached.

With lvm you can quickly and easily extend a Linux file system on the fly without interrupting any services.

Continue reading “Working with logical volumes (part 2)”

Working with logical volumes (part 1)

Part one of working with logical volumes will cover the basic’s involved in creating logical volumes.


For those of you who just want the order of the commands.

sudo pvcreate </path/to/device>
sudo vgcreate <vgname> </path/to/device>
sudo lvcreate -n <lvname> -L <size> <vgname>
sudo mkfs.<filesystem> </path/to/lv>

What you need to follow this guide

  • A free disk (I used an empty virtual machine disk)
  • Any Linux distribution (In this example I’ll be using Fedora 26, but the commands are the same across the entire Linux spectrum)
  • LVM packages (lvm2 – usually pre-installed)

What is LVM?

Logical Volume Management (LVM) offers a way to abstract a disk, multiple disks, or disk partitions into one logical volume. LVM filesystems can be rearranged, resized, moved, removed, created, and deleted on the fly. They offer incredible flexibility when setting up a new system or when rethinking the storage layout of an existing system.

Logical Volume Management filesystems are made up of 4 major parts

Continue reading “Working with logical volumes (part 1)”