kbsecret-stash-file
- store a file in a kbsecret(1) record
kbsecret stash-file
[options] <record> [filename]
kbsecret stash-file
stores the contents of a given file in an unstructured record.
If "-" is passed instead of filename, then standard input is read instead.
-s
, --session
<session>The session to create the record under.
If unspecified, the default session is assumed.
-f
, --force
Force record creation, even if overwriting another record with the same label.
-b
, --base64
Base64 encode the file before stashing it. This is useful primarily for stashing binary files, as records cannot currently contain binary data.
-
, --stdin
Read the file from standard input instead of from filename.
$ kbsecret stash-file priv-key ~/privkey.gpg
$ kbsecret stash-file note-to-self -
the secret password is '1234'