Skip to content

Instantly share code, notes, and snippets.

View georgjaehnig's full-sized avatar

Georg Jähnig georgjaehnig

View GitHub Profile
@georgjaehnig
georgjaehnig / ssh-add-with-pass.sh
Last active March 7, 2021 16:04
Add an encrypted SSH key with `ssh-add` and get the password from `pass` (passwordstore.org)
#!/bin/bash
# Script adapted from
# https://stackoverflow.com/a/13034313
#
# Requirements:
# - "expect" https://linux.die.net/man/1/expect
SSH_KEY_FILE="FULL_PATH_TO_SSH_FILE" # example: "/Users/alice/.ssh/id_rsa"
PASS_NAME="NAME_OF_FILE_IN_~/.password-store" # example: "my-ssh-passphrase"

Keybase proof

I hereby claim:

  • I am georgjaehnig on github.
  • I am jorges (https://keybase.io/jorges) on keybase.
  • I have a public key ASAEqqRsaj5E8BVGmIGw4o3gouWCuVdmmjliQmP1kxUvuwo

To claim this, I am signing this object: