]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
use custom SSH server configuration in LFS file
authorPeter Müller <peter.mueller@link38.eu>
Mon, 10 Sep 2018 15:52:23 +0000 (17:52 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 20 Sep 2018 13:28:15 +0000 (14:28 +0100)
Include OpenSSH server configuration file during build.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/openssh

index 0e6acc2278555b26f39e5077ae0887d0d9fadc80..337fa30495d0024a3b0d67aa5ab4fb986b743a2b 100644 (file)
@@ -82,23 +82,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
-       sed -i -e 's/^#\?Port .*$$/Port 22/' \
-               -e 's/^#\?Protocol .*$$/Protocol 2/' \
-               -e 's/^#\?LoginGraceTime .*$$/LoginGraceTime 30s/' \
-               -e 's/^#\?PubkeyAuthentication .*$$/PubkeyAuthentication yes/' \
-               -e 's/^#\?PasswordAuthentication .*$$/PasswordAuthentication no/' \
-               -e 's/^#\?MaxStartups .*$$/MaxStartups 5/' \
-               -e 's/^#\?IgnoreUserKnownHosts .*$$/IgnoreUserKnownHosts yes/' \
-               -e 's/^#\?UsePAM .*$$//' \
-               -e 's/^#\?X11Forwarding .*$$/X11Forwarding no/' \
-               -e 's/^#\?SyslogFacility AUTH .*$$/SyslogFacility AUTH/' \
-               -e 's/^#\?LogLevel INFO .*$$/LogLevel INFO/' \
-               -e 's/^#\?AllowTcpForwarding .*$$/AllowTcpForwarding no/' \
-               -e 's/^#\?PermitRootLogin .*$$/PermitRootLogin yes/' \
-               -e 's|^#\?HostKey /etc/ssh/ssh_host_dsa_key$$||' \
-               -e 's|^#\?HostKey /etc/ssh/ssh_host_ecdsa_key$$||' \
-               -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|' \
+
+       # install custom OpenSSH server configuration
+       install -v -m 644 $(DIR_SRC)/config/ssh/sshd_config \
                /etc/ssh/sshd_config
 
        # install custom OpenSSH client configuration