The YubiKey is a great OpenGPG smart card compatible hardware device. I use my YubiKey to store my private GnuPG key and for authenticating SSH connections. A few applications, however, don’t work with the OpenGPG card and require a file containing the key per default; Sequel Pro is one of them.
Luckily I stumbled upon an older issue at GitHub with a neat workaround using Automator in macOS.
The Basics
Together with the latest GPG Suite for macOS, the configuration is not more complex than adding a line to your .bash_rc
or .zshrc
file:
export SSH_AUTH_SOCK=/Users/sbstjn/.gnupg/S.gpg-agent.ssh
This tells your SSH application to use the GPG Agent for any authentication requests. So when you run ssh user@host
, a prompt will ask you for your smart card pin instead. Awesome!
Automator
Use Automator in macOS to create a new application and configure Automator to run a shell script containing the following lines:
source ~/.zshrc
/Applications/Sequel\ Pro.app/Contents/MacOS/Sequel\ Pro


This post is mostly a reminder for my future self how to setup macOS, Sequel Pro, and a YubiKey to access MySQL databases using an SSH tunnel.
-
November 5th, 2017
350 Words
If you love software workflows as much as I do, you should check out my basics for deploying NPM packages using TypeScript, CircleCI v2, and GitHub Releases.
-
November 3rd, 2017
176 Words
The MaxMind GeoLite2 database is basically the standard solution when you need to get the geo information for an IP address. Together with the mmdb-reader NPM package you can easily deploy your own serverless API to AWS Lambda to lookup locations for IP addresses.
-
August 23rd, 2017
593 Words
AWS Lambda functions together with an Amazon Kinesis Stream offer a great way to process continuous information. I created an example project called Serverless Analytics to demonstrate this. You can use this as the starting point to create your very own Google Analytics clone and run it serverless and hopefully maintenance-free on Amazon.
-
July 19th, 2017
151 Words
Since a few days, Amazon provides a native way to enable Auto Scaling for DynamoDB tables! Luckily the settings can be configured using CloudFormation templates, and so I wrote a plugin for serverless to easily configure Auto Scaling without having to write the whole CloudFormation configuration.
-
When you use a serverless environment for your service (and you should!), chances are high you might be using the Serverless framework and may end up in a situation like me with the need to process the AWS CloudFormation Stack Output after deploying the service.
-
April 1st, 2017
1011 Words
Have you ever wondered how to process messages from SQS without maintaining infrastructure? Amazon Web Services perfectly support SNS as a trigger for AWS Lambda functions, but with SQS you have to find a custom solution. This tutorial will show an experimental setup using Serverless to read messages from an SQS queue and build auto-scaling worker processes.
-
March 30th, 2017
1647 Words
If you read my first article about Amazon Alexa and AWS Lambda, you already know how to deploy a custom Alexa skill using Apex. With this article, you will learn how to use the Serverless framework to deploy a function to AWS Lambda and invoke it with your Amazon Echo using voice commands.