You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
friends
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.
thanks for any pointers, srini
a2800276
unread,
Jan 14, 2020, 8:43:29 AM1/14/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
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!
R Srinivasan
unread,
Jan 14, 2020, 4:37:08 PM1/14/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message