Last active
December 17, 2019 04:23
-
-
Save RyanSquared/0d4b1885feab9d294c17309a50b796fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eufo pipefail | |
user="$1" | |
logger "Handling user login $user" | |
psql "postgresql://ssh_auth:sheiJoh9chei7eezae9v@userdb-attempt-too-do-user-989073-0.db.ondigitalocean.com:25060/userdb?sslmode=require" \ | |
-t --pset border=0 \ | |
--set user="$user" \ | |
<<< "select jsonb_array_elements_text(data->'ssh_keys') from passwd where passwd.name = :'user')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment