15

I am currently using GNOME Keyring (codenamed seahorse). (Edit: newer versions of this application are now called "GNOME Passwords and Keys"). I am using it to manage my SSH passwords.

I would like to know if there are any command-line alternatives to this, which I can use in situations when I don't have access to the UI. I am currently running Ubuntu 12.04.

3
  • this probably is what you are looking for: askubuntu.com/questions/18927/… ?
    – Rinzwind
    Jan 9, 2014 at 9:05
  • 6
    This is not a duplicate: that question is about interfacing with GNOME keyring. This question is about finding an alternative to GNOME keyring. Jan 9, 2014 at 12:45
  • 1
    As @AndreaCorbellini wrote, this is not a duplicate question. I wanted to add github.com/jaraco/keyring as a possible answer, but I can't. And it's not appropriate for the the 'duplicate-origin' as well.
    – Eyal Levin
    Nov 6, 2017 at 14:55

3 Answers 3

6

Technically, gnome-keyring is not a GUI tool. Seahorse is. And gnome-keyring infrastructure can be accessed via command line, using this project.

This is using the Python bindings that Rinzwind mentions in his comment, and using this tool, you can simply do this:

./gkeyring.py get -s myserver.com -p ftp -u user

This will look for all keyring items concerning server myserver.com with protocol ftp and username user.

as mentioned in this blog.

4
  • 4
    Looks like this no longer works in Ubuntu 18.04 because the gnomekeyring module no longer exists for python.
    – b_laoshi
    Nov 6, 2018 at 6:22
  • look at pypi.org/project/keyring Dec 8, 2018 at 7:31
  • Unfortunately installing gnome-keyring installs 70MB+ including icons. Clunky on light servers
    – Jonathan
    Sep 6, 2020 at 8:10
  • 1
    ... and to make matters worse, gkeyring is not maintained any longer. The package maintainer suggests using secret-tool and/or pypi.org/project/keyring instead. Mar 3, 2021 at 14:34
2

If you don't want to use gnome key ring you can always use the kernal keyring...

See my notes... https://antofthy.gitlab.io/info/crypto/passwd_caching.txt

And more specifically https://antofthy.gitlab.io/info/crypto/keyring_linux_kernal.txt

1
  • Can it be used with subversion?
    – neuhaus
    Jun 9, 2021 at 10:23
1

I've solved this problem with gnome-keyring-cli.

To install it:

  • clone repo
  • be sure glib-devel and libgnome-keyring-devel (or your system equivalent) are available
  • compile just invoking make
  • by hand copy the gnome-keyring-cli binary at the destination of your choice (my is ~/bin/)

With gnome-keyring-cli you can lookup, add, remove, etc. It's not very user friendly but it's doing the job.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .