Skip to main content

Certbot SSH authenticator plugin

Project description

Certbot-ssh - Certbot SSH authenticator plugin

Certbot-ssh is a plugin for the Certbot ACME client that performs HTTP01 challenge validation on a remote computer through a SSH connection.

Rationale

The Certbot client assumes it runs on the machine that serves web pages for the requested domain.

That is not always desirable or even possible.

The manual authenticator (--manual) allows to run the client on a separate machine; it is then up to the system administrator to make sure the web server responds appropriately to the HTTP01 challenge, by putting a specific value into a specific file under the .well-known/acme-challenge directory of the web server. This can be quite tedious, especially if you require a cert for many domains.

This plugin provides an automatized version of the “manual” process. Upon receiving the challenge data from the ACME server, it will execute a script on a remote machine through a SSH connexion, and feed it with the challenge data. It is then up to the script to write the challenge tokens at the appropriate place.

A sample script is provided. This script assumes the webroot of a requested domain is under a /var/www/domain directory; you will probably need to adjust it according to the layout of your own web server.

Usage

Install the package:

$ python setup.py install --user

Tweak the acme-challenge.sh script if needed, then upload it to your server. Put it somewhere in the PATH of the user account you use for SSH connection. Remove the .sh extension and make sure the script is executable.

Then you may call Certbot:

certbot certonly \
  --authenticator incenp.certbot.ssh:ssh \
  --incenp.certbot.ssh:ssh-server user@server.example.com \
  ...

Note that the client will attempt to write to some system directories on the local machine (/etc/letsencrypt, /var/lib/letsencrypt). Use the --config-dir, --work-dir, and --logs-dir options to specify other directories if you want to run the client from a non-root account.

Copying

Certbot-ssh is distributed under the same terms as Certbot itself, that is, the Apache License version 2.0. The full license is included in the COPYING file of the source distribution.

Homepage and repository

The project is located at https://incenp.org/dvlpt/certbot-ssh.html. The latest source code is available at https://git.incenp.org/damien/certbot-ssh.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

incenp.certbot.ssh-0.2.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

incenp.certbot.ssh-0.2.2-py2.py3-none-any.whl (9.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file incenp.certbot.ssh-0.2.2.tar.gz.

File metadata

  • Download URL: incenp.certbot.ssh-0.2.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.0

File hashes

Hashes for incenp.certbot.ssh-0.2.2.tar.gz
Algorithm Hash digest
SHA256 37175b9c64d38ba015b17c42ba1423330315789bd1299c9cf21e024b5a9315bc
MD5 3b7a84160e605aba26a1904be5beb639
BLAKE2b-256 ca3e1a0d5d03f4c76b5d48cc698e28c9f95b8ad11dec3634d61e996e98cd8868

See more details on using hashes here.

Provenance

File details

Details for the file incenp.certbot.ssh-0.2.2-py2.py3-none-any.whl.

File metadata

  • Download URL: incenp.certbot.ssh-0.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.0

File hashes

Hashes for incenp.certbot.ssh-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 97cc6053a6a527fae278f93a17a442a7f3be2830e826dbaeefe65bfa04dccb5d
MD5 214107379ec589be917fe1fa09a089dd
BLAKE2b-256 c1cbc31a298ea1f18a0fca73ae23a6b96db4719cde0aec4f99ffa88161e251c0

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page