Skip to content

Instantly share code, notes, and snippets.

View uow-dmurrell's full-sized avatar

David Murrell uow-dmurrell

View GitHub Profile
@uow-dmurrell
uow-dmurrell / authorized_keys.py
Created September 13, 2018 01:53
Requires the following rpm packages installed: yum install -y python-kerberos python-ldap python-krbV
#!/usr/bin/python
# Used ideas from here, but perl + gssapi + ldap doesn't work on RHEL6
# http://www.sysadmin.org.au/index.php/2012/12/authorizedkeyscommand/
import pprint
import ldap
import ldap.sasl
import os
import socket