> > > looking for guidance on how to get an rsa.PublicKey from id_rsa.pub > seems like I can parse the id_rsa.pub contents and get a ssh.PublicKey but > how do I transform this into an rsa.PublicKey > i need the coersion in order to use other support services. > > Please consider whether this is really what you need to be doing. If you're being provided with a id_rsa.pub file (presumably from a .ssh configuration directory) you will very likely be performing ssh operations, which are ideally left up to the ssh library to perform.
If you have a very exotic usecase an know what you are doing, the ssh package uses the crypto.rsa package internally to parse the ssh keyfiles, so just have a look at the implementation there: https://github.com/golang/crypto/blob/master/ssh/keys.go#L262 Good Luck! -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1d89c44c-10a4-4379-87a1-0b5da6c81460%40googlegroups.com.