alajmo / sake

:robot: sake is a task runner for local and remote hosts

Home Page:https://sakecli.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for .pem keys

fuster92 opened this issue · comments

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

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

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

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

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.

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.