SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch


Trying to configure and use an nginx server that uses intermediate certifcates, you get the error about values mismatch and nginx does not start


It seems that this is a common mistake and it is mentioned here: In order to fix this you will need to change/reverse the original order that you have concatenated the chain, as in:

Decode access secret key from Terraform IAM user creation


You want to use the pgp encryption when using Terraform to create an AWS IAM user, and you have the secret access token returned as an output but encoded.


Use the following to get the actual secret key decoded (after copying your encoded key to a file encrypted_key.txt:

Raspberry, Ubuntu and Megatools

To install megtools (command line utilities for, in your raspberry with ubuntu installed follow the steps below (thanks to the instructions from here:

  • Install the necessary packages

You may also need to add some additional packages if there is an error about the documentation.

  • Get the latest source code from
  • Compile and install them
  • Add your Mega account credentials in ~/.megarc like:
  • use the mega tools commands (megacopy, megals, megaget etc.

WiFi, Raspberry Pi 4 B, Ubuntu 20.04

After installing an image of the Ubuntu server on the Raspberry 4, the wifi is not automatically configured after the initial book.

In order to be able to use the WiFi follow the steps described below for setting up your wifi in your SD card, and then reboot your raspberry (make sure that the indentation in the yaml file is correct, and also your WiFi access point is enclosed in quotes):

Find your public IP address from linux command line


You would like to find out your public IP from the command line without using an online service


Use dig like the following line (taken from

dig +short

you could also add it as an alias:

alias myip=”dig +short”

Automatic emails using bash and sendgrid


You would like to be able to automatically send some emails (ie reports) from a linux server, using a bash script that runs in cronjob, without installing an email server on the linux server.


  • Create an account in Sendgrid and follow the directions for using WebAPI with curl
  • Set up your bash script to use the API key and have a script like the following. If you want to use big or multiple files you will need to use a temporary file for the base64 encoding, as in the example below, as there is a limit in curl.
  • Add your script to crontab