This repository was archived by the owner on Oct 15, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 301
Setting up Password Store to sync with a local computer
Harsh Shandilya edited this page Mar 29, 2020
·
8 revisions
Git is flexible in the way that all installations are both clients as well as servers and thus we can simply clone repositories present on a local network or filesystem as we from a remote server like a Git hosting service. To setup a local PC so that it can be accessed by Password Store, you'll need the following things installed, available from any of the many package managers across different operating systems and Linux flavors.
- OpenSSH
- Git (duh)
- Generate a set of OpenSSH keys. Unfortunately, Jsch doesn't support many new key ciphers so we're stuck with 4096-bit RSA as the strongest supported cipher. Don't save these keys in your ~/.ssh directory, since we do not want the PC to use this when authenticating with other servers, it just needs to authorize this pair to connect to it.
$ ssh-keygen -t rsa -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (/home/msfjarvis/.ssh/id_rsa): pass_store
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in pass_store.
Your public key has been saved in pass_store.pub.
The key fingerprint is:
SHA256:C5+Ypk1/tCiBZM8QaSGArJmakMCHcdtVHeDSMct/Whw msfjarvis@ryzenbox
The key's randomart image is:
+---[RSA 4096]----+
|=o+..o ..=o.. |
|o+.o* . + +. |
|o+.o o . = E |
|* + . . . . |
|o. o =. S . + |
|o . += o. + |
| =.+o o |
| =... o |
| . .... |
+----[SHA256]-----+
$ ls
pass_store pass_store.pub
- Make your local computer trust this keypair. Place the public part of the keypair in OpenSSH's
authorized_keys
file so that you can connect to the computer with this key.
$ echo pass_store.pub >> ~/.ssh/authorized_keys
- Import the SSH key in Password Store, then delete it from your phone.
$ adb push pass_store /sdcard/
$ adb shell chmod 644 /sdcard/pass_store
- Set the server config in Password Store.
Field | Value |
---|---|
Username | your username on the computer |
Server URL | local IP of the computer. Generally starts with 192.168.0 |
Port | 22 by default, depends on your OpenSSH configuration |
Repo path | location of git repo relative to your home directory |
Authentication mode | SSH key |
- Clone!