SETUP-SSHD(8)

πŸ“¦ version 3.22.0, in alpine 3.24

🌸 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 openssh it 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), or none. 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:

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-sshd sets PermitRootLogin here. 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