I need to run an SSH server and log the IP & public key of any client that attempts to connect (without actually granting access).
The use case is this: I deploy this web app to a remote host that, during the build process, fetches some dependencies from github/bitbucket (git uses ssh which uses keys). Now if I want this hosting server to have access to some private repos, I need to whitelist it's public key, however the host doesn't provide access to read the key directly off the filesystem. But I can point it to any SSH host and it will make a connection, presumably handing out it's public key. I'd like to log this.
Any suggestions appreciated.