-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split ssh public key and comment #29
Comments
@grv87 I'd recommend setting the comment to key = SSHKey.generate(comment: "bensie")
# => #<SSHKey:0x007fc989a3fed0 @passphrase=nil, @comment="bensie", @directives=[], @key_object=#<OpenSSL::PKey::RSA:0x007fc989a3fd40>, @type="rsa">
key.comment = nil
# => nil
key.ssh_public_key
# => "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMa72cykdsZ0yyqeS+Spm/0GimN2uJ0AWY46bpEmAo2TKT3bmionSLVE1kqbTrLfeTrXsbrjnhOgFS3A3BshI4/9i4JeQ5OyqJiotG+S5qQhQsSSC8olwIes2/34cV70aPQa7PNdlfAv1H/7pUVrNu4lJU7BI1NevWpmWG7PG9cu9ifRcdCy7O3CMHiB1HnqCZ6SgSLyedopdCpR8x3fhYWxM6ca+LrUANePMbfC7yPUO4G5mSMGUXmFYCDyIlYQXR3KCzBxHN8y4H1WXMxlSdHFw/qjQtX1rqvtk0yOer/H32xInq/LkO7YtrQhqplPIainHxbnSjcJG8KNmb4brV" |
@bensie, I need to parse existing public key. The same way as I've ended using |
Yeah then I think the way you're doing it is your best bet. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you add this feature: split ssh public key to key itself and the comment, so they could be processed separately?
The text was updated successfully, but these errors were encountered: