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

Add more usage examples #2

Open
bexelbie opened this issue Jan 20, 2019 · 2 comments
Open

Add more usage examples #2

bexelbie opened this issue Jan 20, 2019 · 2 comments

Comments

@bexelbie
Copy link

Can you expand on your README a bit and help with use cases for this extension? does it store your SSH keys in the password store and provide them when required to SSH? Is it a way of ensuring your keypasswords are strong by having pass provide them when you unlock your GPG key?

@ibizaman
Copy link
Owner

An example would be nice indeed. Let's say we want to use an ssh key called test.

pass ssh --fzf

If you don't have any ssh key, it would show an empty fzf screen. Write test and press Enter. This will:

  1. Create a passphrase under sshkey-passphrase/test.
  2. Create a private/public key pair under ~/.ssh. ~/.ssh/test and ~/.ssh/test.pub.
  3. Print to stdout the public key ~/.ssh/test.pub.

The output in my case is:

Creating passphrase in sshkey-passphrase/test
Generating ssh key /Users/me/.ssh/test
Generating public/private rsa key pair.
Your identification has been saved in /Users/me/.ssh/test.
Your public key has been saved in /Users/me/.ssh/test.pub.
The key fingerprint is:
SHA256:YN...80 user@hostname
The key's randomart image is:
+---[RSA 4096]----+
...
+----[SHA256]-----+
ssh-rsa AAAA...pRtw== user@hostname

A subsequent call to pass ssh --fzf and selecting test again would only print the public key to stdout:

ssh-rsa AAAA...pRtw== user@hostname

When you then try to connect to a host using this key, you would call pass --clip sshkey-passphrase/test to access the passphrase.

ibizaman pushed a commit that referenced this issue Dec 15, 2019
@ibizaman
Copy link
Owner

Added a commit with a real example in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants