Skip to main content

certbot_deployer_ssh

Certbot Deployer plugin for deploying certificate bundles over SSH via Certbot "deploy hook."

Requires

  • Python 3.9+

Installation

You can install with pip:

python3 -m pip install certbot_deployer_ssh

Or install from source:

git clone <url>
pip install certbot_deployer_ssh

Usage

This tool expects to run as a Certbot deploy hook, and for the environment variable RENEWED_LINEAGE to point to the live certificate directory just updated/created by Certbot.

Any existing certificate bundle under the same Common Name on the remote will be overwritten.

Examples

## Deposit the certificate bundle directory into a remote path on a host

certbot-deployer ssh --host host.domain.tld --destination-path=/path/to/wherever

## Upload the certificate bundle directory
    and run arbitrary commands before and after

certbot-deployer ssh --pre-cmd "touch /some/file" --host host.domain.tld \
    --post-cmd "chown user:grp /path/to/file"

Config

Arguments can be passed directly when calling this tool or configured in the Certbot Deployer configuration file (/etc/certbot_deployer/certbot_deployer.conf)

Reference

usage: certbot-deployer ssh [-h] [--host HOST] [--remote-dir REMOTE_DIR]
                            [--pre-cmd PRE_CMD] [--post-cmd POST_CMD]
                            [--mode MODE]

BIG-IP subcommand
        Certbot Deployer plugin for deploying certificate bundles over SSH
        

options:
  -h, --help            show this help message and exit
  --host, -H HOST       SSH host to target
  --remote-dir, -d REMOTE_DIR
                        Remote destination path in which to drop the
                        certificate bundle directory. This tool will not
                        attempt to create the path if it does not exist. If
                        not provided, it will be up to the server - that
                        usually ends up being the user's home directory.
  --pre-cmd PRE_CMD     A command to run before uploading the certificate
                        bundle. Can be passed multiple times.
  --post-cmd POST_CMD   A command to run after uploading the certificate
                        bundle. Can be passed multiple times.
  --mode, -m MODE       Mode to apply to the remote certificate bundle
                        directory on upload. Defaults to `0700`.

This tool expects to run as a Certbot deploy hook, and for the
environment variable `RENEWED_LINEAGE` to point to the live
certificate directory just updated/created by Certbot.

Any existing certificate bundle under the same Common Name on the
remote will be overwritten.

# Credentials

SSH credentials should be determined by the user's SSH config, e.g.:

    # /home/user/.ssh/config
    Host host.domain.tld
        user deploy_user
        IdentityFile /path/to/key

See the Fabric library's documentation on SSH configuration for more:

    https://docs.fabfile.org/en/latest/concepts/configuration.html

Contributing

Merge requests are welcome. You should probably open an issue first to discuss what you would like to change.

To run the test suite:

# Dependent targets create venv and install dependencies
make

Please make sure to add/update tests along with any changes.

License

License :: OSI Approved :: MIT License

Metadata

Release files for certbot-deployer-ssh 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for certbot-deployer-ssh 1.0.0
File Size Uploaded Provenance Actions
certbot_deployer_ssh-1.0.0.tar.gz 8.9 kB Without provenance Details for certbot_deployer_ssh-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for certbot-deployer-ssh 1.0.0
File Interpreter ABI Platform Actions
certbot_deployer_ssh-1.0.0-py3-none-any.whl Python 3 none any Details for certbot_deployer_ssh-1.0.0-py3-none-any.whl

Total release size: 16.9 kB

Release files / certbot_deployer_ssh-1.0.0.tar.gz

Download URL certbot_deployer_ssh-1.0.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b614082fdb11a951ad02d7b6475d23c35d690cad15319e8c7a13cb0051258ac4
BLAKE2b-256 checksum
How to use checksums
121c354b8df135725a320dbc87647daf3959fdc6db84187d0e744cddbe7644f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / certbot_deployer_ssh-1.0.0-py3-none-any.whl

Download URL certbot_deployer_ssh-1.0.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6dcf8b589458c4e967863e5b7f6c57b68eae42d4de59c2f53d8eb647e64ead03
BLAKE2b-256 checksum
How to use checksums
73ad28f87617415e1171062958f4b9356c7f393eadae59241678560bf60cd38f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for certbot-deployer-ssh 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page