]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
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 bc95648d8b24b06764bce2b6c5d2d81022e67742..147b79a64ee2d94ecee56067aecb30240fc42ebe 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 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',
 'ssh portfw' => 'TCP-Weiterleitung zulassen',
 'ssh tempstart15' => 'SSH-Deamon in 15 Minuten beenden',
 'ssh tempstart30' => 'SSH-Deamon in 30 Minuten beenden',
index 7e5ba5e7497b05ef2509e110db5e3823a6087d52..22f3561eac156417a285e0b3cc77677e4d7dcf06 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 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',
 'ssh portfw' => 'Allow TCP forwarding',
 'ssh tempstart15' => 'Stop SSH demon in 15 minutes',
 'ssh tempstart30' => 'Stop SSH demon in 30 minutes',
index 7e5ba5e7497b05ef2509e110db5e3823a6087d52..22f3561eac156417a285e0b3cc77677e4d7dcf06 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 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',
 'ssh portfw' => 'Allow TCP forwarding',
 'ssh tempstart15' => 'Stop SSH demon in 15 minutes',
 'ssh tempstart30' => 'Stop SSH demon in 30 minutes',
index 52515ea8e1dedd682e173adf6166fd4f8936896d..0bdc5834808e45bde4526a0aa8c86e24303cc0d1 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/^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
                                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);
 
 
                                freekeyvalues(kv);