From dfe8129640b69d3a618cfb91736209238dad0457 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Wed, 9 Feb 2022 17:06:59 +0100 Subject: [PATCH] Allow override of SSH key glob: documentation (MR 2167) --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index e7f0f178..01c0eba0 100644 --- a/README.md +++ b/README.md @@ -201,6 +201,25 @@ pmbootstrap supports `doas` and `sudo`. If multiple sudo implementations are installed, pmbootstrap will use `doas`. You can set the `PMB_SUDO` environmental variable to define the sudo implementation you want to use. +### Select SSH keys to include and make authorized in new images + +If the config file option `ssh_keys` is set to `True` (it defaults to `False`), then all files +matching the glob `~/.ssh/id_*.pub` will be placed in `~/.ssh/authorized_keys` in the user's +home directory in newly-built images. + +Sometimes, for example if you have a large number of SSH keys, you may wish to select a +different set of public keys to include in an image. To do this, set the `ssh_key_glob` +configuration parameter in the pmbootstrap config file to a string containing a glob that is to +match the file or files you wish to include. + +For example, a `~/.config/pmbootstrap.cfg` may contain: + + [pmbootstrap] + # ... + ssh_keys = True + ssh_key_glob = ~/.ssh/postmarketos-dev.pub + # ... + ## Development ### Requirements for running tests * [Shellcheck](https://shellcheck.net/)