Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

108.1. openssh-10.6p1

OpenSSH client and server

10.6p1-1 · SSH-OpenSSH · 1.6 SBU · 8.6 MiB, 36 files · 41_system, 517 of 1047 · ports/core/servers/openssh

Homepage: https://www.openssh.com/

OpenSSH is the SSH client and server: ssh, scp, sftp, ssh-keygen, ssh-agent, ssh-add, ssh-copy-id and the daemon sshd. sshd ships turned off; how it is turned on, and the firewall rule that goes with it, are in SSH server.

Depends on: openssl, libfido2, zlib, libedit, ldns, krb5, libmd.

Required by (4): gvfs, mosh, sshfs, waypipe.

Sources: openssh-10.6p1.tar.gz (2.2 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install openssh'

build.sh:

./configure --prefix=/usr                     \
			--sysconfdir=/etc/ssh             \
			--libexecdir=/usr/lib/$name       \
			--with-privsep-path=/var/lib/sshd \
			--without-zlib-version-check     \
			--with-security-key-builtin       \
			--with-libedit                    \
			--with-ldns                       \
			--with-xauth=/usr/bin/xauth       \
			--with-kerberos5=/usr
make
make DESTDIR=$PKG install

install -v -m755 contrib/ssh-copy-id $PKG/usr/bin
install -v -m644 contrib/ssh-copy-id.1 $PKG/usr/share/man/man1
install -dm700 -o root -g sys $PKG/var/lib/sshd

install -Dm644 /dev/stdin "$PKG/etc/profile.d/50-ssh-agent.sh" <<'KDOS_SH'
if [ -z "$SSH_AUTH_SOCK" ] && [ -n "$XDG_RUNTIME_DIR" ] && [ -S "$XDG_RUNTIME_DIR/ssh-agent.socket" ]; then
	export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
fi
KDOS_SH

Programs: scp, sftp, ssh, ssh-add, ssh-agent, ssh-copy-id, ssh-keygen, ssh-keyscan, sshd.

Directories: /etc/ssh, /usr/lib/openssh, /usr/share/licenses/openssh, /var/lib/sshd.

build.sh writes /etc/profile.d/50-ssh-agent.sh, which only exports SSH_AUTH_SOCK to $XDG_RUNTIME_DIR/ssh-agent.socket once that socket exists, and starts nothing. The agent itself is the ssh-agent user service, /etc/kdos/user-services/15_ssh-agent.sh from the base file system, which runs it from the account’s first login to its last logout under the user-service supervisor (the user’s services). An agent forked from a login shell belongs to no supervisor: it outlives the runtime directory turnstile removes at the last logout, with its socket gone, and the next login starts another beside it. A login that gets no user services, such as one with no runtime directory, gets no agent.