Skip to content

Instantly share code, notes, and snippets.

Avatar

Brent Maxwell brentmaxwell

View GitHub Profile
@brentmaxwell
brentmaxwell / myusbgadget
Last active Jun 1, 2020 — forked from geekman/myusbgadget
Pi Zero multiple USB gadgets minimal example
View myusbgadget
#!/bin/bash -e
modprobe libcomposite
cd /sys/kernel/config/usb_gadget/
mkdir g && cd g
echo 0x1d6b > idVendor # Linux Foundation
echo 0x0104 > idProduct # Multifunction Composite Gadget
echo 0x0100 > bcdDevice # v1.0.0
View better-ssh-authorized-keys-management.md

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server:

@brentmaxwell
brentmaxwell / gist:4e0239b214f589cc3d80824a4bef8f34
Created May 4, 2016 — forked from davidnunez/gist:1404789
list all installed packages in android adb shell
You can’t perform that action at this time.