SETUP-SSHD(8)
πΈ SETUP-SSHD(8) β the setup-sshd page, bestie edition πΈ
okay so this is a page from the System Manager's Manual and it's literally all about getting your SSH daemon set up. no cap, it's more useful than it sounds. let's go π
β¨ NAME β¨
setup-sshd β configure the SSH daemon π¦
β¨ SYNOPSIS β¨
setup-sshd [-h] [-k KEY] [openssh | dropbear | none]
π DESCRIPTION π
setup-sshd installs and configures an SSH server, periodt. It's got your back for openssh and dropbear. And if you pass none? It just skips SSH setup entirely β no drama, main character energy of "not today" π.
Here's the vibe check on how it runs:
- You give it a server as an argument β the script runs non-interactively. It just does the thing, no questions asked. Iconic.
- You give it nothing β it prompts you for a choice, and for
opensshit also configures root login settings and authorized keys. So it's all chatty and helpful π«Ά.
The -k option specifies an authorized key for root. It can be a public key, an HTTP/HTTPS/FTP URL, or none. And the SSH_KEY environment variable is used as the default β so if you set that, you don't even have to type the flag. Convenient fr fr β¨.
After installation, the SSH service is enabled in the default runlevel and started. It's alive, bestie π₯.
π OPTIONS π
-k KEYβ authorized key for root login. Accepts a public key, a URL (http,https,ftp), ornone. This is your "here's my key, let me in" moment π.-hβ display usage information and exit. The classic "wait, how does this work again?" flag π.
π INTERACTIVE MODE π
Without a server argument, the script prompts:
Which ssh server? ('openssh', 'dropbear' or 'none')
Then for openssh, when no authorized key and no unprivileged users exist, the script prompts:
Allow root ssh login? ('?' for help)
The accepted values are yes, no, and prohibit-password. And the help text β that's what you get by typing ? β explains each option, so you're never just guessing π.
π§ Shortcut era β key URLs expand, iykyk
These little shortcuts expand key URLs for you:
al USERβ fetch keys fromhttps://gitlab.alpinelinux.org/USER_.keysgl USERβ fetch keys fromhttps://gitlab.com/USER_.keysgh USERβ fetch keys fromhttps://github.com/USER_.keys
After root login is configured, the script prompts for an authorized key:
Enter ssh key or URL for root (or 'none')
The al, gl, gh shortcuts apply here too. And a key is validated with ssh-keygen β so it checks its work, as it should π.
π¦ FILES π¦
/root/.ssh/authorized_keysβ authorized keys file for root. This is where the approved keys live, lowkey the VIP list ποΈ./etc/ssh/sshd_configβ OpenSSH configuration file.setup-sshdsetsPermitRootLoginhere. That's the line it edits, no cap.
β EXIT STATUS β
0β Success. Slay. πnon-zeroβ An error occurred. π Something went sideways.
πΈ SEE ALSO πΈ
sshd(8), dropbear(8), ssh-keygen(1), setup-alpine(8) β go read these too if you're obsessed with the lore π«Ά
π AUTHORS π
Natanael Copa <ncopa@alpinelinux.org> and others. Legends, honestly π
bestie reminder: this page is from Alpine Linux, dated 2026-06-09. Screenshot it, cite it, keep it in the group chat β it's giving documentation excellence πβ¨π
π¦ where this page comes from
- alpine 3.24: alpine-conf-doc 3.22.0-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms