https://github.com/s-hamann/ansible-openwrt-dropbear
Ansible role for dropbear configuration on OpenWrt
https://github.com/s-hamann/ansible-openwrt-dropbear
ansible-role dropbear openwrt
Last synced: 5 days ago
JSON representation
Ansible role for dropbear configuration on OpenWrt
- Host: GitHub
- URL: https://github.com/s-hamann/ansible-openwrt-dropbear
- Owner: s-hamann
- Created: 2024-03-11T17:00:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-18T15:29:05.000Z (12 months ago)
- Last Synced: 2025-10-29T05:45:35.713Z (8 months ago)
- Topics: ansible-role, dropbear, openwrt
- Language: Jinja
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
OpenWrt Dropbear
================
This role configures [Dropbear](https://matt.ucc.asn.au/dropbear/dropbear.html) on [OpenWrt](https://www.openwrt.org/) targets.
It can also set up SSH public key authentication for the `root` user.
Requirements
------------
This role requires the [community.openwrt](https://github.com/ansible-collections/community.openwrt) collection on the Ansible controller.
As it exclusively uses modules from this collection, Python is *not* required on the target system.
Role Variables
--------------
* `dropbear_config`
A dictionary of uci configuration options for Dropbear.
Refer to the [documentation](https://openwrt.org/docs/guide-user/base-system/dropbear) for valid keys and their meaning.
This role's default configuration deviates from OpenWrt's in two points:
* `Interface` is set to `lan`
* `PasswordAuth` and `RootPasswordAuth` are disabled if `dropbear_user_public_key` is set.
* `dropbear_user_public_key`
A list of SSH public key that are added to the global `authorized_keys` file of the `root` user.
SSH key public key can be given as the keys themselves or as paths to the public key files on the Ansible controller.
Optional.
* `dropbear_enable_sftp`
If set to `true`, this role installs [OpenSSH](https://www.openssh.com/)'s SFTP server component so that the SFTP subsystem an be used with the target system.
Defaults to `false`.
Dependencies
------------
This role does not depend on any specific roles.
Example Configuration
---------------------
The following is a short example for some of the configuration options this role provides:
```yaml
dropbear_config:
Port: 2222
Interface: "{{ omit }}"
dropbear_user_public_key:
- ~/.ssh/id_ed25519.pub
```
License
-------
MIT