Creating a user on a Ubuntu Linux server with a certificate login in PuTTY just like Amazon AWS

One nice thing about amazon AWS is that it creates a ubuntu user for you and spits out a certificate which you can send through puttygen and create a certificate to login to the server quite easily. This is very convenient.

However if you are on some other host, you don’t have this convenience. A password login is the default. So here’s how to do that.

Create the new user:
sudo useradd yourusername
( make sure you specify a password – we aren’t going to use it, but the OS needs it. )

Login to this new user account and then type:
ssh-keygen -t rsa
( just stick with the default choices unless you want a password on the cert too. )

Then move these files to the .ssh directory and shuffle the names..

mv ~/.ssh/ ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
cat ~/.ssh/id_rsa

Cat will produce a big dump like…

Copy this entire chunk into a text file and save it to a .pem file on your windows desktop. This is the equivalent of what Amazon AWS generates when it first sends you the key.

You can then load this file into PuTTYgen, click ‘save private key’, and boom, you have your .ppk.

Two other tweaks to imitate amazon’s setup…

in /etc/ssh/sshd_config, set this line:
passwordAuthentication no
This will disable password authentication and require a certificate for SSH logins, just like how Ubuntu AWS servers work by default.

Type sudo visudo to get into the sudo editor.
Change the line that includes your username to look like this:

yourusername ALL=(ALL) NOPASSWD:ALL

Then remove the user’s password using this command:
sudo passwd -d yourusername

Bam! you now no longer have to type the password for this user when sudo-ing.

The actually correct way to setup Microsoft Office365 DKIM records ( 2020 )

Okay, i had to do a write up on this because i spent hours looking through tutorials and even Microsoft’s site lead me astray.. here is a tested working way to get DKIM working through Office 365.

Step 1. Login to the admin center ( you should know how to do this! )

Step 2. Click ‘exchange in the lower right hand menu, after clicking the option to display all items:

Step 3. Click ‘dkim’ in the ‘protection’ area.

Step 4. You will see a list of domains. Click the domain you’re looking to enable DKIM for, and hit ‘enable’.

A message like this will pop up, giving you the DKIM settings to put in the DNS settings of your domain host. The fun part here is that after you select the text, the yellow area showing your CNAME records disappears, so you have to hit ctrl-c to copy it while holding the mouse button down. Thanks Microsoft, lol!

Step 4B.

Okay, so what Microsoft doesn’t tell you is the ‘host’ setting for the CNAME records. This is the fun part that you’re probably missing.

The hostname/value combination for this record:

Should be:
Host: selector2._domainkey

Step 5.

Wait an hour ( or however long it is your nameserver tends to propagate records – this can be between 5 minutes to 2 days! ), go back to the Microsoft Office Admin site, and hit ‘enable’ on DKIM for that domain. If you don’t get a yellow error message, you are all set up with DKIM:

Results of my ketogenic intermittent fasting experiment

Last winter, i had been watching some youtube videos by the hodge twins on intermittent fasting and felt inspired to try it myself. In a previous post, i talked about the routine i created and explained why i thought it was a good idea, based on months of research and a little personal experience prior. I decided to approach my intermittent fasting routine like a science experiment, and devoted myself to being as consistent with the routine as possible, as well as tracking my weight every day.

Here is an annotated plot of the weight data i collected using google fit:


I aimed to lose 25lbs but lost 27. I was pretty impressed with the fact that i could still lose weight at this pace, years after losing 80lbs doing a semi-lazy ketogenic diet and having the effort required to lose more weight exceed my willpower under that way of dieting. I lost weight at almost twice the speed doing intermittent fasting.

Some interesting things happened along the journey, though.

Continue reading “Results of my ketogenic intermittent fasting experiment”

Series lipo charging, aka lipo charging tutorial


Hello folks. Been meaning to get around to making a newbie tutorial for 10S RC lipo charging for a while now. Here goes.

10S ( 36v/38v ) is very easy to live with on a day to day basis; there are a handful of RC chargers that are designed to do 10s, so finding the bits and pieces required is not too difficult. The 38v nominal voltage can easily provide 15-30mph speed on a hub motor ( depending on the motor ).  And best of all, after everything is set up, the charging process is pretty braindead and hard to goof up!

Continue reading “Series lipo charging, aka lipo charging tutorial”

Dear internets..

I have been putting off making into a real site ( and not just an empty hole for hosting electric bike images ) for quite some time. More cool stuffs to come.. -neppy