Ich habe mir Ubuntu-Server auf einer virtuellen Maschine installiert und SSH und SFTP eingerichtet. Funktioniert alles wunderbar, nur kann ich kein ChrootDirectory anlegen. Mit ChrootDirectory-Eintrag sieht meine /etc/ssh/sshd_config so aus:
Wenn ich dann "/etc/init.d/ssh restart" ausführe erhalte ich folgende Fehlermeldung:
Ich habe in der Man-Page von sshd_config reingeschaut. Unter dem Schlüsselwort match ist folgender Eintrag zu lesen (kein Wort von ChrootDirectory als mgl. Parameter):
Dann habe ich im Internet eine andere Man-Page von sshd_config gefunden (man sshd_config(5)). Hier sieht der Match-Eintrag so aus (ChrootDirectory + diverse andere Parameter zusätzlich enthalten)
Auf meinem Ubuntu Hardy läuft folgende OpenSSH-Version
"OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007"
Weiss jemand wieso das bei mir nicht funktioniert?
Code:
Match User sftp
ChrootDirectory /home/%u
AllowTCPForwarding no
X11Forwarding no
PasswordAuthentication no
ForceCommand /usr/lib/openssh/sftp-server
Wenn ich dann "/etc/init.d/ssh restart" ausführe erhalte ich folgende Fehlermeldung:
Code:
paul@ubuntu:~$ sudo /etc/init.d/ssh restart
/etc/ssh/sshd_config: line 81: Bad configuration option: ChrootDirectory
/etc/ssh/sshd_config line 81: Directive 'ChrootDirectory' is not allowed within a Match block
Ich habe in der Man-Page von sshd_config reingeschaut. Unter dem Schlüsselwort match ist folgender Eintrag zu lesen (kein Wort von ChrootDirectory als mgl. Parameter):
Code:
Match Introduces a conditional block. If all of the criteria on the Match line are satisfied, the keywords on the following lines override those set in the global section of the config file,
until either another Match line or the end of the file. The arguments to Match are one or more criteria-pattern pairs. The available criteria are User, Group, Host, and Address. Only a
subset of keywords may be used on the lines following a Match keyword. Available keywords are AllowTcpForwarding, Banner, ForceCommand, GatewayPorts, GSSApiAuthentication,
KbdInteractiveAuthentication, KerberosAuthentication, PasswordAuthentication, PermitOpen, RhostsRSAAuthentication, RSAAuthentication, X11DisplayOffset, X11Forwarding, and X11UseLocalHost.
Dann habe ich im Internet eine andere Man-Page von sshd_config gefunden (man sshd_config(5)). Hier sieht der Match-Eintrag so aus (ChrootDirectory + diverse andere Parameter zusätzlich enthalten)
Code:
Match Introduces a conditional block. If all of the criteria on the
Match line are satisfied, the keywords on the following lines
override those set in the global section of the config file,
until either another Match line or the end of the file.
The arguments to Match are one or more criteria-pattern pairs.
The available criteria are User, Group, Host, and Address. The
match patterns may consist of single entries or comma-separated
lists and may use the wildcard and negation operators described
in the PATTERNS section of ssh_config(5).
The patterns in an Address criteria may additionally contain
addresses to match in CIDR address/masklen format, e.g.
``192.0.2.0/24'' or ``3ffe:ffff::/32''. Note that the mask
length provided must be consistent with the address - it is an
error to specify a mask length that is too long for the address
or one with bits set in this host portion of the address. For
example, ``192.0.2.0/33'' and ``192.0.2.0/8'' respectively.
Only a subset of keywords may be used on the lines following a
Match keyword. Available keywords are AllowAgentForwarding,
AllowTcpForwarding, Banner, ChrootDirectory, ForceCommand,
GatewayPorts, GSSAPIAuthentication, HostbasedAuthentication,
KbdInteractiveAuthentication, KerberosAuthentication,
MaxAuthTries, MaxSessions, PasswordAuthentication,
PermitEmptyPasswords, PermitOpen, PermitRootLogin,
RhostsRSAAuthentication, RSAAuthentication, X11DisplayOffset,
X11Forwarding and X11UseLocalHost.
Auf meinem Ubuntu Hardy läuft folgende OpenSSH-Version
"OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007"
Weiss jemand wieso das bei mir nicht funktioniert?