From patchwork Tue Apr 9 02:34:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 2186 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id 8CD0088DACA for ; Mon, 8 Apr 2019 17:35:04 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 44dGHC28V9z5D0NH; Mon, 8 Apr 2019 17:35:03 +0100 (BST) Received: from [127.0.0.1] (163-172-12-160.rev.poneytelecom.eu [163.172.12.160]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 44dGH63h0Mz5D0ND for ; Mon, 8 Apr 2019 17:34:58 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904rsa; t=1554741299; 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: references; bh=b/DzXX7i4p3HakfaOzgey0tsZVljH+UPqBTJEb+2OzY=; b=CjiH8JQqqfgTbOcna9vmLyn8wJTkq1iPOz1uq75vQuw37wKxyIeHAyISgkbJ1f0PZiZpRX OjMbvMOkQuADkp368j7ls+jP5rdKRHWFPBVdDd/wzEVjPzgbl79Fr/FCxR8zeJvCWBQBte Umi5gtAAlJvs7v0PxO9sb8cFpTlPX2cgYVCdwHAarHw7DyR8xDY1y0wbG6FtZHzgF0uyhT QE34MindNvdED3cQSrs/44TukT3u+pl0OdYASmSUP/ChehNAOs5sqpaLM5feqJHoPH9kJ3 eijrs6NGVPE0yyN6n/AHO6z5k1H+2SN+abHBl5oWeew0/CPZETXifZp51cxxYA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904ed25519; t=1554741299; 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: references; bh=b/DzXX7i4p3HakfaOzgey0tsZVljH+UPqBTJEb+2OzY=; b=3HI3HP3n+zJeOoDzWdTGGTX3Wmg40epp2Cd96/U/yCIY7/RDhb5nt2vLdL5mKu7m2BUisP XNHWbL2vM6T+8kDQ== To: "IPFire: Development-List" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH 1/3] add language strings for SSH agent forwarding settings Organization: IPFire.org Message-ID: <30e9ab83-d79f-fdb9-bd57-584ba14c0154@ipfire.org> Date: Mon, 08 Apr 2019 16:34:00 +0000 MIME-Version: 1.0 Content-Language: en-US Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=pmueller smtp.mailfrom=peter.mueller@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Peter Müller --- langs/de/cgi-bin/de.pl | 1 + langs/en/cgi-bin/en.pl | 1 + 2 files changed, 2 insertions(+) diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 88b34d23b..d63ebe6e5 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -2187,6 +2187,7 @@ 'ssh access' => 'SSH-Zugriff', 'ssh access tip' => 'IPFire SSH läuft nicht auf dem Standardport 22!', 'ssh active sessions' => 'Aktive Benutzeranmeldungen', +'ssh agent forwarding' => 'Weiterleitung des SSH-Agenten (Agent Forwarding) zulassen', 'ssh fingerprint' => 'Fingerabdruck', 'ssh host keys' => 'SSH Host Schlüssel', 'ssh is disabled' => 'Secure Shell ist deaktiviert. Halte an.', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index af0d514af..a709604b0 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -2230,6 +2230,7 @@ 'ssh access' => 'SSH Access', 'ssh access tip' => 'IPFire SSH is not using default port 22!', 'ssh active sessions' => 'Active logins', +'ssh agent forwarding' => 'Enable SSH agent forwarding', 'ssh fingerprint' => 'Fingerprint', 'ssh host keys' => 'SSH Host Keys', 'ssh is disabled' => 'SSH is disabled. Stopping.', From patchwork Tue Apr 9 02:35:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 2187 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id BD73888DACA for ; Mon, 8 Apr 2019 17:35:32 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 44dGHm2Qdxz52pLc; Mon, 8 Apr 2019 17:35:32 +0100 (BST) Received: from [127.0.0.1] (163-172-12-160.rev.poneytelecom.eu [163.172.12.160]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 44dGHj1ygvz5D0ND for ; Mon, 8 Apr 2019 17:35:28 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904rsa; t=1554741330; 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: references; bh=k4TI+thS7clnNxZZdu1W2WX8py1tNhqFCBUDh9yGr7Q=; b=B8AUz4Fi7NDeutEpGrNTx5OCuQr761olbaCzqRX6HCqXHyerU0m43KptN4pbGQc7z9+WKW 9w3bPO/7xZIJtt15xGYph3p6sn2mprkw/EKN4edENJEeUQL/pAO+3JXW7YwuWzHWYv4eKy 06TuePrZ4dJzPv5VcwrDK5xaWaf8J+6ud7fg0CAuxN8LRmOo8CYFYLiUoPzqZTmMtjO3rW ZMsGPtZ7aUpItFmZpINPb6w2sza0FBHEEnKwyqijlX/avLE3rsSDKE7R3YUPdgFt5MDpVm F9UuSp85chudXFENPV7GYW+LfjppClStwJRdTaCsPq1FlfYdi5n5zBZR9/QE2Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904ed25519; t=1554741330; 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: references; bh=k4TI+thS7clnNxZZdu1W2WX8py1tNhqFCBUDh9yGr7Q=; b=3oLPhSMa7aZStHRV0NiUcsA+PELBQvujJNwUB1YH/yYrn46magIUGRFpHYWoGu9GuBZsKq WtibI+YLs1nqxmAA== To: "IPFire: Development-List" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH 2/3] allow SSH agent forwarding to be configured via WebUI Organization: IPFire.org Message-ID: Date: Mon, 08 Apr 2019 16:35:00 +0000 MIME-Version: 1.0 Content-Language: en-US Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=pmueller smtp.mailfrom=peter.mueller@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Fixes #11931 Signed-off-by: Peter Müller Cc: Michael Tremer --- html/cgi-bin/remote.cgi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/html/cgi-bin/remote.cgi b/html/cgi-bin/remote.cgi index 1b3dfed70..10d94fe99 100644 --- a/html/cgi-bin/remote.cgi +++ b/html/cgi-bin/remote.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2014 IPFire Team # +# Copyright (C) 2007-2019 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -105,6 +105,7 @@ else { # used $remotesettings{'ENABLE_SSH_PASSWORDS'} = 'on' unless exists $remotesettings{'ENABLE_SSH_PASSWORDS'}; $remotesettings{'ENABLE_SSH_KEYS'} = 'on' unless exists $remotesettings{'ENABLE_SSH_KEYS'}; + $remotesettings{'SSH_AGENT_FORWARDING'} = 'off' unless exists $remotesettings{'SSH_AGENT_FORWARDING'}; $checked{'ENABLE_SSH'}{'off'} = ''; $checked{'ENABLE_SSH'}{'on'} = ''; @@ -121,6 +122,9 @@ $checked{'ENABLE_SSH_KEYS'}{$remotesettings{'ENABLE_SSH_KEYS'}} = "checked='chec $checked{'SSH_PORT'}{'off'} = ''; $checked{'SSH_PORT'}{'on'} = ''; $checked{'SSH_PORT'}{$remotesettings{'SSH_PORT'}} = "checked='checked'"; +$checked{'SSH_AGENT_FORWARDING'}{'off'} = ''; +$checked{'SSH_AGENT_FORWARDING'}{'on'} = ''; +$checked{'SSH_AGENT_FORWARDING'}{$remotesettings{'SSH_AGENT_FORWARDING'}} = "checked='checked'"; &Header::openpage($Lang::tr{'remote access'}, 1, ''); @@ -161,6 +165,11 @@ print < $Lang::tr{'ssh port'} + +   + + $Lang::tr{'ssh agent forwarding'} + From patchwork Tue Apr 9 02:35:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 2188 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id 4231288DACA for ; Mon, 8 Apr 2019 17:35:57 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 44dGJD5xSFz5D0ND; Mon, 8 Apr 2019 17:35:56 +0100 (BST) Received: from [127.0.0.1] (163-172-12-160.rev.poneytelecom.eu [163.172.12.160]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 44dGJ86nslz5D0ND for ; Mon, 8 Apr 2019 17:35:52 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904rsa; t=1554741353; 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: references; bh=HwnYaPLWA4lqGos5nVHs2VJh6L4TOI37iJ9q8FwONkc=; b=A/gGUYLBh9/7eoUshEnDERUyF/yZff1VzhOVi5AZAeqUshoW5f87jS2+aSNDho00huSSM1 nPx1VRhW8IOTEQKzYk5Wte2rKN7+Ww3kJrHn5jcu8mNHpfFOgSGLnbJBD0Sth4+4b8ZwF5 pTgjAxcH0N5x0LVN6BxmJGhMrwI0PXz06OBT6Lnb9Yq7bT7sO02FubegpOPVns2Oh0ErcQ BZb+23u3FhVWLle84XlRIjbHgcjSxDatBVRcXsWAQe6ZhQSOjKXxsFjUIvMnXiGIZDTDRA qq7bTFEYktW/ZK+fOCKulJ3ptkH5+2Q9YseZOpycMwYPIavoK41oQTp6ke5o3Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904ed25519; t=1554741353; 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: references; bh=HwnYaPLWA4lqGos5nVHs2VJh6L4TOI37iJ9q8FwONkc=; b=3ApY4AFmgLE8gR262E/8WVWNEh41DAISfcDw/VbpPCbOWXbvIls8EUw8V6oMfzxQBYQTXV f5JCqXy1hiXZWPAQ== To: "IPFire: Development-List" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH 3/3] change AllowAgentForwarding in SSHD configuration if, necessary Organization: IPFire.org Message-ID: <3222f6d5-4cb7-1914-609e-9856fb5ff73d@ipfire.org> Date: Mon, 08 Apr 2019 16:35:00 +0000 MIME-Version: 1.0 Content-Language: en-US Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=pmueller smtp.mailfrom=peter.mueller@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Fixes #11931 Signed-off-by: Peter Müller Cc: Michael Tremer --- src/misc-progs/sshctrl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/misc-progs/sshctrl.c b/src/misc-progs/sshctrl.c index 30074973d..476dbc9d5 100644 --- a/src/misc-progs/sshctrl.c +++ b/src/misc-progs/sshctrl.c @@ -76,6 +76,11 @@ int main(int argc, char *argv[]) else strlcat(command, "s/^Port .*$/Port 222/", STRING_SIZE - 1 ); + if(findkey(kv, "SSH_AGENT_FORWARDING", buffer) && !strcmp(buffer,"on")) + strlcat(command, "s/^AllowAgentForwarding .*$/AllowAgentForwarding yes/;", STRING_SIZE - 1 ); + else + strlcat(command, "s/^AllowAgentForwarding .*$/AllowAgentForwarding no/;", STRING_SIZE - 1 ); + freekeyvalues(kv); snprintf(buffer, STRING_SIZE - 1, "' /etc/ssh/sshd_config >&%d", config_fd );