I am trying to get access to get public key that was used to authenticate 
an ssh connection (https://godoc.org/golang.org/x/crypto/ssh#ConnMetadata) 
inside the PublicKeyCallback while handling a channel request. I want to be 
able to accept the connection with any public key, but then control some 
application level permissions based on this key later. Is this possible?  
Currently it seems the only information you can access is the User name. 

I'm trying to create an auth system similar to github's ssh auth.  I want 
to allow anyone to ssh as a user like g...@github.com then do a database 
lookup on the key that was used to auth later when it tries to access 
something it might not have permission for. With the current API it seems 
like its only possible to enable or disable permissions based on the 
username, and not the key used.

Thanks for any help

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to