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
--sysconfdir=/etc/ssh— Keep the client’s and the server’s configuration and the host keys under/etc/ssh, where70_sshd.shmakes the missing host keys.--libexecdir=/usr/lib/$name— Installsftp-serverand the other helpers under/usr/lib/openssh, the pathmake installwrites intosshd_config’ssftpsubsystem.--with-privsep-path=/var/lib/sshd— The empty directory the pre-login process is confined to;build.shcreates it mode 0700.--with-security-key-builtin— Take keys held on a FIDO security key through libfido2, with no separate middleware library.
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.