logicnow / BlueSky

An SSH tunneling solution for remote Mac-to-Mac connectivity (formerly a Mac-MSP product)
Apache License 2.0
39 stars 15 forks source link

Convert admin key fingerprints to authorized_keys comments for connections table #5

Open bestmacs opened 6 years ago

bestmacs commented 6 years ago

admin-wrapper.sh is reading /var/log/auth.log to collect info for recording admin activity in the connections mySQL table. There is a column to capture which key is being used (i.e. which admin is doing the connecting) but first we need to use the SHA2 fingerprint from auth.log to lookup which key from /home/admin/.ssh/authorized_keys is being used, and then put the key comment (which is the description made by the user via Admin Setup) in the column.