Skip to content

Instantly share code, notes, and snippets.

# Why?
# To paste text into windows that normally don't allow it or have access to the clipboard.
# Examples: Virtual machines that do not yet have tools installed, websites that highjack paste
#
# How?
# Create a service: open Automator, create new service, receive no input, use any application, run applescript code below, save
# Activate: open application menu from menu bar, go to services, and you will see your service
on run
tell application "System Events"
@carlchan
carlchan / yubikey-ssh-ca.sh
Created September 24, 2019 14:36
SSH CA using a Yubikey
#!/bin/sh
set -e
set -x
openssl genrsa 2048 > ca.key
yubico-piv-tool -s9c -aimport-key < ca.key
openssl req -x509 -days 3650 -sha256 -subj "/CN=SSH CA" -key ca.key | yubico-piv-tool -s9c -S"/CN=SSH CA" -averify -aimport-certificate
# Sign with: