From bea4fc7a926c436c10529cb40642ef8b91f0d405 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 03:35:32 +0200 Subject: Setting AuthorizedKeysFile in sshd_config to /etc/ssh/authorized_keys/%u .ssh/authorized_keys. Signed-off-by: Daniel Baumann --- debian/openssh-server.dirs | 1 + .../0022-sshd_config-AuthorizedKeysFile.patch | 17 +++++++++++++++++ debian/patches/series | 1 + 3 files changed, 19 insertions(+) create mode 100644 debian/openssh-server.dirs create mode 100644 debian/patches/progress-linux/0022-sshd_config-AuthorizedKeysFile.patch diff --git a/debian/openssh-server.dirs b/debian/openssh-server.dirs new file mode 100644 index 0000000..46167f3 --- /dev/null +++ b/debian/openssh-server.dirs @@ -0,0 +1 @@ +etc/ssh/authorized_keys diff --git a/debian/patches/progress-linux/0022-sshd_config-AuthorizedKeysFile.patch b/debian/patches/progress-linux/0022-sshd_config-AuthorizedKeysFile.patch new file mode 100644 index 0000000..14d7cc8 --- /dev/null +++ b/debian/patches/progress-linux/0022-sshd_config-AuthorizedKeysFile.patch @@ -0,0 +1,17 @@ +Author: Daniel Baumann +Description: Setting AuthorizedKeysFile in sshd_config to /etc/ssh/authorized_keys/%u .ssh/authorized_keys. + +diff -Naurp openssh.orig/sshd_config openssh/sshd_config +--- openssh.orig/sshd_config ++++ openssh/sshd_config +@@ -43,9 +43,7 @@ PermitRootLogin no + + #PubkeyAuthentication yes + PubkeyAcceptedKeyTypes ssh-ed25519-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-256 +- +-# Expect .ssh/authorized_keys2 to be disregarded by default in future. +-#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2 ++AuthorizedKeysFile /etc/ssh/authorized_keys/%u .ssh/authorized_keys + + #AuthorizedPrincipalsFile none + diff --git a/debian/patches/series b/debian/patches/series index 89e7be8..debba12 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -55,3 +55,4 @@ progress-linux/0018-sshd_config-MACs.patch progress-linux/0019-sshd_config-PubkeyAcceptedKeyTypes.patch progress-linux/0020-sshd_config-HostCertificate.patch progress-linux/0021-sshd_config-HostKey.patch +progress-linux/0022-sshd_config-AuthorizedKeysFile.patch -- cgit v1.2.3