102 Commits

Author SHA1 Message Date
John Audia
4845aca6a3 openssh: update to 10.2p1
Changelog: https://www.openssh.com/txt/release-10.2

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc

Signed-off-by: John Audia <therealgraysky@proton.me>
2025-10-17 06:50:11 +03:00
John Audia
a503ffe6b8 openssh: update to 10.1p1
Changelog: https://www.openssh.com/txt/release-10.1

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc

Signed-off-by: John Audia <therealgraysky@proton.me>
2025-10-11 19:01:17 +03:00
Konstantin Demin
6ff10c3abf openssh: adjust with glibc and libcrypt-compat
glibc 2.39 has removed libcrypt completely.
solution: link against libxcrypt built with glibc compatibility.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
2025-07-14 10:40:15 +02:00
Philip Prindeville
023b7bf21f openssh: wrong permissions on /etc/ssh
For users to make use of system-wide settings, the /etc/ssh/
directory and its contents need to be world readable.

Fixes: #26608
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-06-07 14:44:07 -06:00
Fabrice Fontaine
4faf09cfb5 net/openssh: fix PKG_CPE_ID
openbsd:openssh is a better CPE ID than openssh:openssh as this CPE ID
has the latest CVEs (whereas openssh:openssh has no CVEs):
https://nvd.nist.gov/products/cpe/search/results?keyword=cpe:2.3:a:openbsd:openssh

Fixes: 299e5b0a9b (treewide: add PKG_CPE_ID for better cvescanner coverage)

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2025-04-24 19:44:38 +08:00
John Audia
0ec5c1e1a9 openssh: bump to 10.0p1
This update requires sshd-auth to be packaged due to the authentication
bin split introduced in this version.

Changelog: https://www.openssh.com/txt/release-10.0

Build system: x86/64
Build-tested: x86/64
Run-tested: x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
2025-04-16 18:52:44 +02:00
Mikael Magnusson
2bd00ef789 openssh: add FIDO U2F and FIDO2 hardware token support
Add openssh-sk-helper package containing ssh-sk-helper.

The helper can be used by openssh-client, openssh-sftp-client,
and openssh-keygen to access `ecdsa_sk` and `ed25519_sk keys
provided by a FIDO U2F or FIDO2 hardware token connected over USB.

Close #24509

Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
2025-04-13 16:48:17 +08:00
Mikael Magnusson
0a3ef8cbf4 Revert "openssh: Add FIDO2 hardware token support"
This reverts commit 855db864b0.

The reverted commit doesn't make sense since the component
(ssh-sk-helper) that uses libfido2, which is mentioned in
the commit message, isn't packaged.

Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
2025-04-13 16:48:17 +08:00
John Audia
67784bf4d0 openssh: bump to 9.9p2
Updated and removed upstreamed patch.

Highlights relating to security:

* Fix CVE-2025-26465 - ssh(1) in OpenSSH versions 6.8p1 to 9.9p1
  (inclusive) contained a logic error that allowed an on-path
  attacker (a.k.a MITM) to impersonate any server when the
  VerifyHostKeyDNS option is enabled. This option is off by default.

* Fix CVE-2025-26466 - sshd(8) in OpenSSH versions 9.5p1 to 9.9p1
  (inclusive) is vulnerable to a memory/CPU denial-of-service related
  to the handling of SSH2_MSG_PING packets. This condition may be
  mitigated using the existing PerSourcePenalties feature.

Both vulnerabilities were discovered and demonstrated to be exploitable
by the Qualys Security Advisory team. We thank them for their detailed
review of OpenSSH.

Full release notes: https://www.openssh.com/txt/release-9.9p2

Signed-off-by: John Audia <therealgraysky@proton.me>
2025-02-20 16:48:21 +08:00
Michael Heimpold
9ef2d15c29 openssh: fix recursive key file removal
The -r option is not required here but should also not hurt,
since it was already tested, that $key is a file.
However, to express the intent of the command more clearly,
let's drop it.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-01-26 14:36:15 +01:00
Markus Gothe
69c29a5b26 openssh: Validate keys and regenerate if needed.
Imitate dropbear init.d-script and make sure we
don't end up with corrupt keys.

This can happen if we use a caching filesystem,
like 'ubifs', and the DUT is powered off during
boot-up.

Signed-off-by: Markus Gothe <markus.gothe@genexis.eu>
2025-01-25 11:09:48 +01:00
Erik Karlsson
3ac8092a39 openssh: fix killing of active sessions on shutdown
Starting with OpenSSH 9.8 sessions are handled by a separate binary
called sshd-session

Signed-off-by: Erik Karlsson <erik.karlsson@iopsys.eu>
2025-01-25 10:53:24 +01:00
John Audia
b90e9b7eba openssh: bump to 9.9p1
Release notes: https://www.openssh.com/txt/release-9.9

Added upstream patch to fix build[1]

1. 76a618d284.patch

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-09-26 14:15:13 +02:00
Hannu Nyman
49fdabe240 openssh: Use apk-compatible versioning
Adjust openssh's versioning to be compatible with apk:
8.9p1-r2 --> 8.9_p1-r2

"_p" is an allowed semantic suffix, so use that.
(Alternative might have been 8.9.1-r2)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2024-09-05 20:18:20 +03:00
Sean Khan
c7f099a19c openssh: fix incompatible ptr type error GCC 14.1
The `ssh_systemd_notify` function is causing compilation errors
when built against GCC 14.1. This is due to an incompatible pointer
type being passed to the connect function.

The connect function expects a pointer to `struct sockaddr`, but
was receiving a pointer to `struct sockaddr_un`.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-05 13:41:33 -07:00
John Audia
75674f0439 openssh: bump to 9.8p1
Release notes: https://www.openssh.com/txt/release-9.8

* 9.8p1 fixes CVE-2024-6387
* Adjusted Makefile to provide /usr/lib/sshd-session
* Given the troubles with -fzero-call-used-regs and all the
  broken checks, makes sense to skip it

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-07-02 09:30:45 -07:00
Sergey Ponomarev
8aadb12835 openssh-keygen: Make ssh-keygen as an alternative to dropbearkey
The DropBear's dropbearkey tool is compatible with OpenSSH
ssh-keygen.
It was set by default as the /usr/bin/ssh-keygen program since
the PR https://github.com/openwrt/openwrt/pull/14174
Now if a user need for a full ssh-keygen the openssh-keygen package
should substitute it gracefully as an alternative.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
Link: https://github.com/openwrt/packages/pull/22861
[ wrap to 80 columns ]
Link: https://github.com/openwrt/packages/pull/22861
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-05-06 13:44:08 +02:00
John Audia
6be0617c00 openssh: bump to 9.7p1
Release notes: https://www.openssh.com/txt/release-9.7

Removed upstreamed patch: 010-better_fzero-call-detection.patch

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-03-19 23:07:15 +01:00
Sibren Vasse
a79c49578c openssh: fix build failure on powerpc_8548
1036d77b34

Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2024-01-06 13:48:02 -08:00
Rucke Teg
e8dfc6abbe openssh: bump to 9.6p1
Release notes: https://www.openssh.com/txt/release-9.6

Signed-off-by: Rucke Teg <rucketeg@protonmail.com>
2024-01-06 13:48:02 -08:00
John Audia
6dc86d46da openssh: bump to 9.5p1
Changelog: https://www.openssh.com/txt/release-9.5

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-10-05 14:37:59 -07:00
Sibren Vasse
7fb8e823b9 openssh: update to 9.4p1
Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2023-08-13 10:53:39 +08:00
Philip Prindeville
ead95a26b6 openssh: add server config subdirectory
Most distros allow dropping site configuration files into
/etc/sshd_config.d/ so that you don't have to tweak the main
server configuration file.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-08-07 16:39:56 -07:00
Sibren Vasse
731f0d70a8 openssh: update to 9.3p2
Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2023-08-04 16:51:45 +08:00
Darren Tucker
74c4ad2c0c openssh: sftp no longer needs crypto or zlib.
OpenSSH 9.1p1 removed remaining dependencies and stopped linking sftp,
sftp-server and scp against libcrypto or libz.  This change moves those
package dependencies from the default to those that still need them.
In particular, this will allow sftp-server to be installed for use with
Dropbear without needing to install zlib or openssl.

Signed-off-by: Darren Tucker <dtucker@dtucker.net>
2023-05-17 11:02:19 +03:00
Darren Tucker
1daddd582f openssh: Use CDN first for source downloads.
Also point to https for website.

Signed-off-by: Darren Tucker <dtucker@dtucker.net>
2023-05-17 11:02:19 +03:00
Erik Karlsson
7029af834c openssh: add respawn and reloading via signal
Configure the openssh server to respawn. Reload by sending SIGHUP

Signed-off-by: Erik Karlsson <erik.karlsson@genexis.eu>
2023-05-01 13:34:10 +03:00
Glen Huang
e36a55c9ed openssh: preserve authorized_keys
The root user is usually the user that clients ssh into with, so in most
cases its authorized_keys determines what clients are allowed to ssh
into this device. Without preserving this file, they could potentially
be locked out after upgrading.

Signed-off-by: Glen Huang <me@glenhuang.com>
2023-04-25 07:23:01 +03:00
Sibren Vasse
2c755759df openssh: update to 9.3p1
Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2023-03-18 14:09:24 -07:00
Sibren Vasse
d41e918a36 openssh: actually build openssh-server-pam with pam support
Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2023-02-03 10:10:36 -08:00
Sibren Vasse
5c43c1bade openssh: update to 9.2p1
Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2023-02-03 10:10:36 -08:00
Sibren Vasse
ba8cb7c16c openssh: update to 9.1p1
Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2022-12-13 10:04:27 +08:00
Sibren Vasse
08b45115d7 openssh: update to 9.0p1
Remove upstreamed patches.

Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2022-04-13 15:46:37 -07:00
Michal Vasilek
ee7aae202a openssh: update to 8.9p1
Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
2022-03-16 19:53:38 -07:00
Rucke Teg
f2a8fc48c5 openssh-server: manually set path to passwd binary
In the build environment the autotools finds the `passwd` binary in
/usr/bin. But in the target image it is available under /bin instead.
Manually set the path to `passwd` binary to `/bin/passwd`

Signed-off-by: Rucke Teg <rucketeg@protonmail.com>
2022-02-10 21:10:08 -08:00
Rucke Teg
fb113c5a70 openssh-server: change sshd.failsafe
There is no need to remove root password from /etc/shadow as the
password in the file is blank anyway in the failsafe mode.

Signed-off-by: Rucke Teg <rucketeg@protonmail.com>
2022-02-10 21:10:08 -08:00
Huangbin Zhan
2689a0d11d openssh-server-pam: add key files as conffiles
Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
2021-11-12 11:04:02 -08:00
Huangbin Zhan
159e12381f openssh: keep same permission for /etc/ssh
Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
2021-11-12 11:04:02 -08:00
Sibren Vasse
1a773dd20e openssh: update to 8.8p1
Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2021-09-27 11:06:52 -07:00
Sibren Vasse
89ab4ebcdb openssh: update to 8.7p1
Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2021-08-25 15:24:38 +02:00
Sibren Vasse
cb1d8bd8ed openssh: update to 8.6p1
Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2021-04-20 12:28:30 +02:00
Sibren Vasse
16e41bcd33 openssh: update to 8.5p1
Signed-off-by: Sibren Vasse <github@sibrenvasse.nl>
2021-03-03 11:38:32 +01:00
Linos Giannopoulos
855db864b0 openssh: Add FIDO2 hardware token support
Version 8.2[0] added support for two new key types: "ecdsa-sk" and
"ed25519-sk". These two type enable the usage of hardware tokens that
implement the FIDO (or FIDO2) standard, as an authentication method for
SSH.

Since we're already on version 8.4 all we need to do is to explicitly enable
the support for hardware keys when compiling OpenSSH and add all the
missing dependencies OpenSSH requires.

OpenSSH depends on libfido2[1], to communicate with the FIDO devices
over USB. In turn, libfido2 depends on libcbor, a C implementation of
the CBOR protocol[2] and OpenSSL.

[0]: https://lwn.net/Articles/812537/
[1]: https://github.com/Yubico/libfido2
[2]: tools.ietf.org/html/rfc7049

Signed-off-by: Linos Giannopoulos <linosgian00@gmail.com>
2021-01-07 00:53:05 +02:00
Huangbin Zhan
75c4617bcf treewide: move binary of alternatives to libexec, rename as suggested
Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
2020-10-08 20:22:51 +08:00
Kyle Copperfield
45863b94ca openssh: add openwrt failsafe support
Adds failsafe support to the openssh package.
Roughly based on an earlier patch.

Ref: https://github.com/openwrt/openwrt/pull/865
Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
Signed-off-by: Kyle Copperfield <kmcopper@danwin1210.me>
2020-12-15 10:19:32 +00:00
Yuan Tao
27e8c832d6 openssh: update to 8.4p1
Signed-off-by: Yuan Tao <ty@wevs.org>
2020-10-05 15:20:26 +08:00
Huangbin Zhan
704e733e51 treewide: fix broken conffiles
Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
2020-07-07 18:29:13 +08:00
Rosen Penev
8e77b50954 openssh: update to 8.3p1
Removed outdated options.

Small bashism fix in the init script.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-25 17:38:55 -07:00
Rosen Penev
69c297971c openssh: always enable stackprotect option
b933f9cf0cb254e368027cad6d5799e45b237df5 in base made several changes
to OpenWrt's libssp support. It seems this workaround is no longer
needed.

Simplified the configure script slightly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-20 00:17:37 -07:00
Philip Prindeville
73fa0c963d openssh-server: deprecate the ecdsa HostKey
The init.d script for sshd never generates an ecdsa HostKey as seen
here:

	for type in rsa ed25519
	do
		# check for keys
		key=/etc/ssh/ssh_host_${type}_key
		[ ! -f $key ] && {
			# generate missing keys
			[ -x /usr/bin/ssh-keygen ] && {
				/usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&-
			}
		}
	done

so we'll never succeed at loading one.  Get rid of the resultant
error message in logging:

May  5 17:13:59 OpenWrt sshd[20070]: error: Unable to load host key: /etc/ssh/ssh_host_ecdsa_key

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2020-05-05 18:03:56 -06:00