openssh: preserve authorized_keys
authorGlen Huang <me@glenhuang.com>
Thu, 13 Apr 2023 09:55:02 +0000 (17:55 +0800)
committerRosen Penev <rosenp@gmail.com>
Tue, 25 Apr 2023 04:23:01 +0000 (07:23 +0300)
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>
net/openssh/Makefile

index 66c32f7baf4c5fed0d74705fd26a610fa65189a9..06cba0afea91a7d8cb23e0d18a5b14af3fe1285f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssh
 PKG_VERSION:=9.3p1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
@@ -105,6 +105,7 @@ define Package/openssh-server/conffiles
 /etc/ssh/ssh_host_ed25519_key.pub
 /etc/ssh/ssh_host_rsa_key
 /etc/ssh/ssh_host_rsa_key.pub
+/root/.ssh/authorized_keys
 endef
 
 define Package/openssh-server-pam