Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a command-line password manager, much like pwsafe, but one that features SSH key authentication. That is, I'd like to be able to add my SSH key to the authentication when opening the password file, so that I do not have to remember yet another password but can use my SSH key to unlock my other passwords.

Pwsafe is compatible with Counterpane's Win32 PasswordSafe, which is a feature I do not need. I only need command-line access and the possibility to easily copy passwords to the clipboard.

Does such a program exist?

share|improve this question
Why not use your password to unlock your ssh key? – Gilles May 22 '12 at 22:47

I like using KeePass, but it doesn't support command-line usage directly. It does sport an API though, and some others have tried to mend the problem by supplying a command-line frontend using that API. All pulled from the forum thread

  1. A python frontend to the Keepass API: python-keepass
  2. KPcli


  1. Password Gorilla, written in tcl/tk, supposed to handle command-line usage based on pwsafe.

None of them are able to use your ssh key, probably since password storage isn't really a prime candidate for public key encryption (even though it certainly would be convenient). With KeePass it's possible to use your private ssh keyfile as additional cryptographic tie-down, but that's more for adding complexity rather than reducing it.

share|improve this answer

I saw a recent recommendation of cpm Which looks perfect. Unfortunately the link for source download appears to be broken, I emailed the author about it, but have not received a response as yet.

share|improve this answer

There's a fork of cmp on github, since the project hasn't seen any activity from the original author in a fair while.

share|improve this answer

KeePassC, is a curses-based password manager compatible with KeePass v.1.x and KeePassX that supports keyfile authentication (as of version 1.3).

It is lightweight with only two dependencies, and works well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.