Dropbear
Dropbear is lightweight SSH server that is commonly run on routers and other low memory devices. It is also often configured to run during the boot process.
Installation
Configuration
Dropbear server does not have any configuration file. It is configured with command line options.
Enable/start dropbear.service
.
Disable password and root logins
Edit the dropbear.service
. This creates a new drop-in file. Adding content to it will override corresponding sections in main configuration.
Override the command to start Dropbear:
[Service] ExecStart= ExecStart=/usr/bin/dropbear -F -P /run/dropbear.pid -R -w -s
-R
- Is used to generate hostkeys automatically.
-F
- Is used to forbid forking into background.
-w
- Is used to disallow root logins.
-s
- Is used to disable password logins.
Set SSH key from GitLab
Change GitLab URL to your own.
$ mkdir -p ~/.ssh -m 0700 $ curl -sSLf https://gitlab.com/a archie.keys >> ~/.ssh/authorized_keys
Dropbear in Docker container
systemctl
does not work in `archlinux` Docker container.
# systemctl start dropbear
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
You need to start Dropbear manually.
# /usr/bin/dropbear -F -P /run/dropbear.pid -R -w -s