Skip to content

Instantly share code, notes, and snippets.

@trestrantham
Last active October 24, 2018 13:28
Show Gist options
  • Save trestrantham/dfc1da1b9580da46001c to your computer and use it in GitHub Desktop.
Save trestrantham/dfc1da1b9580da46001c to your computer and use it in GitHub Desktop.
#!/bin/sh
# create an account alias
sudo dscl . -append /Users/$USER RecordName Pair pair
# configure sshd to only allow public-key authentication
sudo sed -E -i.bak 's/^#?(PasswordAuthentication|ChallengeResponseAuthentication).*$/\1 no/' /etc/sshd_config
# add pair user public key(s)
touch ~/.ssh/authorized_keys
gh-auth add --users githubuser --command="$( which tmux ) attach -t pair"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment