Message ID | 20180910142909.5725-2-peter.mueller@link38.eu |
---|---|
State | Accepted |
Commit | cc3e41cb8b0b7d713ce15a7177d1bbda7778b2ca |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) by web02.i.ipfire.org (Postfix) with ESMTP id 5A88B61DE2 for <patchwork@web02.i.ipfire.org>; Mon, 10 Sep 2018 16:29:14 +0200 (CEST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id DD370109EBDB; Mon, 10 Sep 2018 15:29:13 +0100 (BST) Received: from mx-nbg.link38.eu (mx-nbg.link38.eu [37.120.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx-nbg.link38.eu", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 36E8A109EBC5 for <development@lists.ipfire.org>; Mon, 10 Sep 2018 15:29:12 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=link38.eu; s=201803; t=1536589750; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nEciDYYo42eE2KiN66Em8UkJv7lZgHEqiuU0vvttJZg=; b=MM+4HPqyT6D6kqDDiZoxkH7kVDDiZuDXmt8JgzYZjCu9yIA31N9fIjUukElq/fXEujMqug lvtlUNyeSM1Bif7FBz8r8EwBMBzsVB0u63bYTZIhIVY9Jsw3yhlQl/T5UkECLwmk5mepSJ Pus2Q2mHRvDroqYYfLfJW5OdJZl9jGisYiQDSXhuih5gsC3p+/an2UcP+u9ChbSTFiscgm CfqgSwLe0vSCHACTOzmpM2UVcy0A7YI/QblUJ1vs+ivjnS1IP3yKAUN3mdqD5wHi/Tp9DN RI6fxcvEoR7Na0xFZI9tLEZzsGtER9EmPyGP+hx0aP25xQBroRZyCVZFgUMu8A== From: =?utf-8?q?Peter_M=C3=BCller?= <peter.mueller@link38.eu> To: development@lists.ipfire.org Subject: [PATCH v2 2/2] use custom SSH client configuration in LFS file Date: Mon, 10 Sep 2018 16:29:09 +0200 Message-Id: <20180910142909.5725-2-peter.mueller@link38.eu> In-Reply-To: <20180910142909.5725-1-peter.mueller@link38.eu> References: <20180910142909.5725-1-peter.mueller@link38.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Authentication-Results: mail01.ipfire.org; dkim=pass header.d=link38.eu; dmarc=pass (policy=none) header.from=link38.eu; spf=pass smtp.mailfrom=peter.mueller@link38.eu X-Spamd-Result: default: False [-11.54 / 11.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[link38.eu]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:37.120.167.53]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DKIM_TRACE(0.00)[link38.eu:+]; RCVD_IN_DNSWL_MED(-2.00)[53.167.120.37.list.dnswl.org : 127.0.6.2]; MID_CONTAINS_FROM(1.00)[]; MX_GOOD(-0.01)[cached: mx-nbg.link38.eu]; DMARC_POLICY_ALLOW(-0.25)[link38.eu,none]; NEURAL_HAM(-3.00)[-0.999,0]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(-3.78)[ip: (-9.91), ipnet: 37.120.160.0/19(-4.96), asn: 197540(-3.96), country: DE(-0.09)]; ASN(0.00)[asn:197540, ipnet:37.120.160.0/19, country:DE]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Status: No, score=-11.54 X-Rspamd-Server: mail01.i.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <https://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
[v2,1/2] add hardened SSH client configuration
|
|
Commit Message
Peter Müller
Sept. 11, 2018, 12:29 a.m. UTC
Include OpenSSH client configuration file during build.
Signed-off-by: Peter Müller <peter.mueller@link38.eu>
---
lfs/openssh | 5 +++++
1 file changed, 5 insertions(+)
Comments
Hello, did you notice that this file is excluded from being updated on existing installations? How do we handle any custom changes from users here? I merged this for new installations already. -Michael On Mon, 2018-09-10 at 16:29 +0200, Peter Müller wrote: > Include OpenSSH client configuration file during build. > > Signed-off-by: Peter Müller <peter.mueller@link38.eu> > --- > lfs/openssh | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/lfs/openssh b/lfs/openssh > index a88b2d126..0e6acc227 100644 > --- a/lfs/openssh > +++ b/lfs/openssh > @@ -100,5 +100,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) > -e 's|^#\?HostKey /etc/ssh/ssh_host_ed25519_key$$||' \ > -e 's|^#\?HostKey /etc/ssh/ssh_host_rsa_key$$|HostKey > /etc/ssh/ssh_host_ecdsa_key\nHostKey /etc/ssh/ssh_host_ed25519_key\nHostKey > /etc/ssh/ssh_host_rsa_key|' \ > /etc/ssh/sshd_config > + > + # install custom OpenSSH client configuration > + install -v -m 644 $(DIR_SRC)/config/ssh/ssh_config \ > + /etc/ssh/ssh_config > + > @rm -rf $(DIR_APP) > @$(POSTBUILD)
Hello Michael, > Hello, > > did you notice that this file is excluded from being updated on existing > installations? no - but I should have thought about that. :-\ > > How do we handle any custom changes from users here? The only possibility of keeping the user's settings is to move existing SSH client configurations to a new location, replace /etc/ssh/ssh_config with this one and include the version before. However, I strongly advise against this. (For example, some settings in the original config might revert hardening options, causing no security benefit after all.) Since it is "just" the client configuration, I consider overwriting it the best procedure. Of course, there has to be a yellow warning box in the release notes, but it is better than no hardening at all. > > I merged this for new installations already. Great. SSH server configuration will follow. Best regards, Peter Müller > > -Michael > > On Mon, 2018-09-10 at 16:29 +0200, Peter Müller wrote: >> Include OpenSSH client configuration file during build. >> >> Signed-off-by: Peter Müller <peter.mueller@link38.eu> >> --- >> lfs/openssh | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/lfs/openssh b/lfs/openssh >> index a88b2d126..0e6acc227 100644 >> --- a/lfs/openssh >> +++ b/lfs/openssh >> @@ -100,5 +100,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) >> -e 's|^#\?HostKey /etc/ssh/ssh_host_ed25519_key$$||' \ >> -e 's|^#\?HostKey /etc/ssh/ssh_host_rsa_key$$|HostKey >> /etc/ssh/ssh_host_ecdsa_key\nHostKey /etc/ssh/ssh_host_ed25519_key\nHostKey >> /etc/ssh/ssh_host_rsa_key|' \ >> /etc/ssh/sshd_config >> + >> + # install custom OpenSSH client configuration >> + install -v -m 644 $(DIR_SRC)/config/ssh/ssh_config \ >> + /etc/ssh/ssh_config >> + >> @rm -rf $(DIR_APP) >> @$(POSTBUILD) >
diff --git a/lfs/openssh b/lfs/openssh index a88b2d126..0e6acc227 100644 --- a/lfs/openssh +++ b/lfs/openssh @@ -100,5 +100,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) -e 's|^#\?HostKey /etc/ssh/ssh_host_ed25519_key$$||' \ -e 's|^#\?HostKey /etc/ssh/ssh_host_rsa_key$$|HostKey /etc/ssh/ssh_host_ecdsa_key\nHostKey /etc/ssh/ssh_host_ed25519_key\nHostKey /etc/ssh/ssh_host_rsa_key|' \ /etc/ssh/sshd_config + + # install custom OpenSSH client configuration + install -v -m 644 $(DIR_SRC)/config/ssh/ssh_config \ + /etc/ssh/ssh_config + @rm -rf $(DIR_APP) @$(POSTBUILD)