From ed4b63b09785b89f5dcbd2517ff0bfd20632be85 Mon Sep 17 00:00:00 2001 From: Timo Boettcher Date: Sat, 2 Jun 2007 21:58:50 +0000 Subject: SSH-Key(only) Login --- usr/local/www/system_advanced.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'usr/local/www/system_advanced.php') diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php index 7328782..e4ff952 100755 --- a/usr/local/www/system_advanced.php +++ b/usr/local/www/system_advanced.php @@ -52,6 +52,8 @@ $pconfig['disablefirmwarecheck'] = isset($config['system']['disablefirmwarecheck $pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']); $pconfig['enablesshd'] = $config['system']['enablesshd']; $pconfig['sshport'] = $config['system']['ssh']['port']; +$pconfig['sshdkeyonly'] = $config['system']['ssh']['sshdkeyonly']; +$pconfig['authorizedkeys'] = base64_decode($config['system']['ssh']['authorizedkeys']); $pconfig['sharednet'] = $config['system']['sharednet']; $pconfig['polling_enable'] = isset($config['system']['polling']); $pconfig['bypassstaticroutes'] = isset($config['filter']['bypassstaticroutes']); @@ -101,6 +103,12 @@ if ($_POST) { $input_errors[] = "You must specify a valid port number"; } } + if($_POST['sshdkeyonly'] == "yes") { + $config['system']['ssh']['sshdkeyonly'] = "enabled"; + } else { + unset($config['system']['ssh']['sshdkeyonly']); + } + $config['system']['ssh']['authorizedkeys'] = base64_encode($_POST['authorizedkeys']); } @@ -305,6 +313,13 @@ include("head.inc"); Enable Secure Shell + +   + + onclick="enable_change(false)" /> + Disable Passwordlogin for Secure Shell (KEY only) + + SSH port @@ -314,6 +329,14 @@ include("head.inc"); + + + +
+ Paste an authorized keys file here. + + +   -- cgit v1.1