Added the possibility to change the ssh port from 222 back to standart port 22
authorJan Paul Tuecking <earl@ipfire.org>
Sat, 20 Feb 2010 00:07:25 +0000 (01:07 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 21 Feb 2010 12:15:20 +0000 (13:15 +0100)
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl
langs/fr/cgi-bin/fr.pl
src/misc-progs/sshctrl.c

index bc95648..147b79a 100644 (file)
 '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',
index 7e5ba5e..22f3561 100644 (file)
 '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',
index 7e5ba5e..22f3561 100644 (file)
 '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',
index 52515ea..0bdc583 100644 (file)
@@ -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);