Setup oath ssh login on Fedora

Setup oath ssh login on Fedora

There are occasions where I’d like to be able to ssh to a system without using the password or having to setup a ssh key. Another alternative for authentication is the pam_oath module which allows you to use OATH applications like FreeOTP or Google Authenticator for 2-factor logins. Start by installing the required packages. This is specific to Fedora, other distributions will be similar but slightly different in fun and challenging ways.

Deploying clortho with ansible and venv

I have started using Ansible to manage the few services that I still have running around here. I want to deploy clortho to a user on the system I use for serving up movies to my Roku players. I need to copy the source, setup a venv with the dependencies (aiohttp), and setup a systemd unit to make sure it is started at boot time. As of Python 3.3 the core library includes support for venv, and Python 3.

clortho - A simple key/value server

clortho is a very simple key/value server written using python 3.4 and aiohttp key namespace is per-client IP address, and there is no authentication. It supports direct connections from clients, and the X-Forwarded-For header for use with proxies. I shouldn’t have to mention that running this on an open network isn’t a good idea. Get a key value by requesting http://server/keystore/<key>: curl http://server/keystore/louis If the key has been set it will return a 200 status with the value.

https is now the default protocol

On June 5th the EFF called for people to ‘Reset the Net’ and do something to enhance their privacy on the net. I have put off switching to https for my sites because I host them using S3 and CloudFront, and up until recently it was extremely expensive to use a SSL certificate with your site. But now, thanks to SNI support in CloudFront, the cost is just slightly more than for http requests.

Automatic Backup of Files to S3 and Glacier

Automatic backups are important, especially when it comes to irreplaceable data like family photos. I have used s3cmd to maintain my website’s static files for a while now, and it was simple to use it to push my 100GB+ archive of photos over to S3. But I needed an automated way to update it with any new photos that my wife or I may take. The sync protocol really isn’t what you want – there should be no need to re-examine all the files that have already been archived.

Chat with Tor and socat

It is easy to setup a simple chat over Tor using the socat utility. To receive incoming messages you first need to setup a Tor hidden service. Add this to the end of your /etc/tor/torrc file: HiddenServiceDir /var/lib/tor/hidden-chat/ HiddenServicePort 2330 After restarting Tor check the /var/lib/tor/hidden-chat/hostname file for your hidden service .onion address. Use socat to setup a listener on port 2330, now incoming connections to ADDRESS.onion:2330 will show up on your terminal.

Xmonad on a MacBook Pro with Fedora 19

For years I have dual booted my Macbook with Fedora. Things have always almost worked, but never quite as smoothly as they do under OSX. Typically the problems are with the trackpad, wireless drivers and heat control – The fans on my MBP didn’t want to kick on at the point I’d like them to and Fedora just runs hotter than OSX does for the same workflow. With F19 things are somewhat better, the following xorg config file dropped into /etc/X11/xorg.

Reliable Wireless Temperatures

The temperature sensors that I use to drive the freezer graph are in my garage, which doesn’t have an easy way to run wires to the server room. I have a WRT54GL running DD-WRT configured as a bridge to the rest of my network. The problem with this is that the connection isn’t always reliable. I used to have a simple script that read the temps and fed them to my main mysql server, but the connection would frequently drop and it would lose the temperature data.
NASCAR Countdown for iPhone

NASCAR Countdown for iPhone

The NASCAR Countdown app displays a countdown to the next NASCAR race, the name of the race and the television network carrying the race. On the flip side all of the races for the season are listed, and tapping on one of them will go to the website for that track. The application now includes all of the Sprint Cup, Nationwide Series and Camping World Truck races. Requirements iPhone or iPod Release Notes v1.

Moving a BackupPC Pool

I have been using BackupPC to automatically back up the systems on my LAN for years now. It started out with a 3x250GB RAID5 as the storage pool and when I ran out of space on that I added another disk to bring it up to about 700GB. BackupPC does an excellent job of pooling common files together so that they don’t take up extra space. This is especially useful if you are backing up system files on multiple systems running the same OS release.