Skip to content
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

Support for .pem keys #5

Closed
fuster92 opened this issue Jun 13, 2022 · 5 comments
Closed

Support for .pem keys #5

fuster92 opened this issue Jun 13, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@fuster92
Copy link

Is your feature request related to a problem? Please describe.
Trying to use a private key with .pem extension gives the following error:

error: failed to parse `path/to/key.pem`
  ssh: not an encrypted key

Describe the solution you'd like
To be able to define servers that use .pem private key files

@alajmo
Copy link
Owner

alajmo commented Jun 15, 2022

Could you provide some more information:

  • do you use a passphrase (if not, then the key isn't encrypted)?
  • how do your config files look for the server (if you use any of the identity_file, password keys)
  • I recently fixed a small issue with identity_file not picked up when setting it via the config, could you try with --identity-file instead until I cut a new release
  • How did you generate your pem file, would be helpful so I could reproduce the issue

@alajmo alajmo added the bug Something isn't working label Jun 16, 2022
@alajmo
Copy link
Owner

alajmo commented Jun 17, 2022

I've fixed some small issues with auth, please check if it works now with version v0.1.8.

@alajmo
Copy link
Owner

alajmo commented Jun 19, 2022

Should work now, please re-open or create a new issue if the bug persists.

@alajmo alajmo closed this as completed Jun 19, 2022
@fuster92
Copy link
Author

Sorry for the late response
There was a problem with the key having the .pem extension and not being actually encrypted, if I rename it, with the latest version it works now.
I'd say that with the previous version the key failed even changing names, but I've forgot if that was the case.

@alajmo
Copy link
Owner

alajmo commented Jun 21, 2022

Great, I don't think Go's SSH library and OpenSSH actually look at the filename to determine key type, format or if it's encrypted, it's all there in the file content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants