TimothyYe / skm

A simple and powerful SSH keys manager
https://timothyye.github.io/skm
MIT License
954 stars 54 forks source link

Allow symlinks from `.ssh` to `.skm` #38

Closed ZinoKader closed 2 years ago

ZinoKader commented 2 years ago

Very nice tool, thank you!

I have a small suggestion for how I think the file handling around the keys should work I and I suppose most other people prefer not moving the ssh keys into .skm, but rather to have symbolic links to the ssh keys created in .skm. Right now, I have the original keys in .skm and symlink them to .ssh but prefer to have it the other way around.

I tried to have the original files in .ssh and symlink them to .skm, but this resulted in the files not being readable:

✔ Found 2 SSH key(s)!

Failed to read  /Users/[[redacted]]/.skm/[[redacted]]@[[redacted]].com/id_rsa.pub
    [[redacted]]@[[redacted]].com   []  []
Failed to read  /Users/[[redacted]]/.skm/[[redacted]]@[[redacted]].com/id_rsa.pub
    [[redacted]]@[[redacted]].com []    []

I suppose currently symlinks are not resolved. By following symlinks, this should be possible to do if one would want to, without changing the default behavior of skm.

TimothyYe commented 2 years ago

I think there is another solution you can try with: https://github.com/TimothyYe/skm#customized-ssh-key-store-path

I haven't tried yet, you can try to set SKM_STORE_PATH with the path of your .ssh directory.

ZinoKader commented 2 years ago

Works great, thank you! You can close this, I totally missed the option to do that.