Indeed. My search yielded:
go get -u -v github.com/ianmcmahon/encoding_ssh
which had exactly what I needed (and should probably be included in the
standard ssh package)
The use case itself - a digital signature facility in our Over The Network
software upgrade procedure.
The following is a go rewrite of the tool (from my previous project) :
https://github.com/RajaSrinivasan/disign.git
thanks, srini
On Tuesday, January 14, 2020 at 8:43:29 AM UTC-5, a2800276 wrote:
>
>
>> 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/e1ab26d1-e5e6-44c3-9bda-4a2a20d5ec15%40googlegroups.com.