From: Jan Paul Tuecking Date: Sat, 20 Feb 2010 00:07:25 +0000 (+0100) Subject: Added the possibility to change the ssh port from 222 back to standart port 22 X-Git-Tag: v2.9-beta1~453^2~1 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=51d1705b87ee29f15a1c25743eb6c08f5574ac09 Added the possibility to change the ssh port from 222 back to standart port 22 --- diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index bc95648d8b..147b79a64e 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1563,6 +1563,7 @@ 'ssh keys' => 'Authentifizierung auf Basis öffentlicher Schlüssel zulassen', 'ssh no auth' => 'Sie haben keinerlei Authentifizierungverfahren zugelassen; dies wird Ihre Anmeldung verhindern', 'ssh passwords' => 'Passwortbasierte Authentifizierung zulassen', +'ssh port' => 'SSH Port auf 22 setzen (Standard ist 222)', 'ssh portfw' => 'TCP-Weiterleitung zulassen', 'ssh tempstart15' => 'SSH-Deamon in 15 Minuten beenden', 'ssh tempstart30' => 'SSH-Deamon in 30 Minuten beenden', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 7e5ba5e749..22f3561eac 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1595,6 +1595,7 @@ 'ssh keys' => 'Allow public key based authentication', 'ssh no auth' => 'You have not allowed any authentication methods; this will stop you logging in', 'ssh passwords' => 'Allow password based authentication', +'ssh port' => 'SSH port set to 22 (default is 222)', 'ssh portfw' => 'Allow TCP forwarding', 'ssh tempstart15' => 'Stop SSH demon in 15 minutes', 'ssh tempstart30' => 'Stop SSH demon in 30 minutes', diff --git a/langs/fr/cgi-bin/fr.pl b/langs/fr/cgi-bin/fr.pl index 7e5ba5e749..22f3561eac 100644 --- a/langs/fr/cgi-bin/fr.pl +++ b/langs/fr/cgi-bin/fr.pl @@ -1595,6 +1595,7 @@ 'ssh keys' => 'Allow public key based authentication', 'ssh no auth' => 'You have not allowed any authentication methods; this will stop you logging in', 'ssh passwords' => 'Allow password based authentication', +'ssh port' => 'SSH port set to 22 (default is 222)', 'ssh portfw' => 'Allow TCP forwarding', 'ssh tempstart15' => 'Stop SSH demon in 15 minutes', 'ssh tempstart30' => 'Stop SSH demon in 30 minutes', diff --git a/src/misc-progs/sshctrl.c b/src/misc-progs/sshctrl.c index 52515ea8e1..0bdc583480 100644 --- a/src/misc-progs/sshctrl.c +++ b/src/misc-progs/sshctrl.c @@ -70,9 +70,14 @@ int main(int argc, char *argv[]) strlcat(command, "s/^PasswordAuthentication .*$/PasswordAuthentication yes/;", STRING_SIZE - 1 ); if(findkey(kv, "ENABLE_SSH_PORTFW", buffer) && !strcmp(buffer,"on")) - strlcat(command, "s/^AllowTcpForwarding .*$/AllowTcpForwarding yes/", STRING_SIZE - 1 ); + strlcat(command, "s/^AllowTcpForwarding .*$/AllowTcpForwarding yes/;", STRING_SIZE - 1 ); else - strlcat(command, "s/^AllowTcpForwarding .*$/AllowTcpForwarding no/", STRING_SIZE - 1 ); + strlcat(command, "s/^AllowTcpForwarding .*$/AllowTcpForwarding no/;", STRING_SIZE - 1 ); + + if(findkey(kv, "SSH_PORT", buffer) && !strcmp(buffer,"on")) + strlcat(command, "s/^Port .*$/Port 22/", STRING_SIZE - 1 ); + else + strlcat(command, "s/^Port .*$/Port 222/", STRING_SIZE - 1 ); freekeyvalues(kv);