Skip to content

Instantly share code, notes, and snippets.

View sriramsa's full-sized avatar

Sriram S sriramsa

  • Salesforce
  • Redmond, WA
View GitHub Profile
@sriramsa
sriramsa / public_pem_to_openssh.go
Created December 17, 2016 04:16
Golang: Convert Public key PEM bytes to Open SSH format
const (
samplePEMKeyA = `
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApIBaVZ8A6HraVxIVGEU+
psJx8S4nFQQykrJ751aicMUNFYThT/tl5Gvvl4H9eimB06iNf4zqnrvKwgtCYjFp
a5rJoaSxA675FBzYpzsHeygnPkt98mFGLRS6SJdNhvuE5QT6ostiLBufdpIyvSUP
cKdwL7ti8QyX3v8Lm7JrJ+DiGW8y3XYWm5kzlHdbah3DB2z2xh9+sQ1orXcxFTf7
CzVmfoTTO+QkeeTz/HG0gRu+EH1cxkMKP/BS8qOrFBFGWt3B/Vv0/lG4AILag+Dn
x4FfMxhlPtIXW4eUc5/SGaNHarJVN4y6mz4I3NvL3abMAWqpX1U9p/iO5kMLlFQX
qQIDAQAB