NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

install/60276: Add "Enable sshd" to the sysinst utilities menu



>Number:         60276
>Category:       install
>Synopsis:       Add "Enable sshd" to the sysinst utilities menu
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 17 09:15:00 +0000 2026
>Originator:     Sad Clouds
>Release:        11.0_RC2
>Organization:
>Environment:
NetBSD  11.0_RC2 NetBSD 11.0_RC2 (GENERIC) #0: Sun Mar  8 10:59:15 UTC 2026  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
When installing NetBSD, some of us prefer command line to the menu based sysinst. Unfortunately sysinst is a bit buggy (moving between disk partitioning menus can cause it to segfault sometimes) and clunky (confusing workflows, garbled console TUI when kernel messages are logged during install to the same console, etc).

There are several menus: "Utility menu" and "Config menu" with overlapping functionality, i.e. both can run /bin/sh, configure networking, set timezone, etc. For example "Config menu"->"Enable sshd" does not actually enabled sshd in the installer. The presentation of these menus is a bit confusing.

I have personally given up on sysinst and would like NetBSD installer to support a workflow for a manual install via a command line. Some of it can be done via various helper menus in "Utility menu", however one important helper menu is missing: "Enable sshd".

If the installer is running in a console, it is not always possible to copy and paste command lines. For this reason, I tend to enable sshd in the installer and then perform all install and configuration via ssh:

Utility menu -> Run /bin/sh

1. Set root password:
   passwd root

2. Create necessary directories for sshd:
   mkdir -p /var/chroot/sshd

3. Mount /etc/ssh directory. Read-only /etc is mounted on tmpfs via union so we can modify files, but this does not propagate to sub-directories, hence mount /etc/ssh via union so that sshd can create private and public key files on startup:
   mount -t tmpfs -o union tmpfs /etc/ssh

4. Permit root login via ssh:
   sed -i 's/^#PermitRootLogin prohibit-password$/PermitRootLogin yes' /etc/sshd/sshd_config

5. Start sshd:
   /etc/rc.d/sshd onestart

Now we can ssh into the installer, partition disks and extract sets.

It would be nice to automate the above steps with a new menu option.

>How-To-Repeat:

>Fix:




Home | Main Index | Thread Index | Old Index