Lieber Besucher, herzlich willkommen bei: Linux Forum Linux-Web.de. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.
Benutzerinformationen überspringen
Prof. Dr. Schlaumeier
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »MIKE bt« (12.06.2009, 13:36)
Benutzerinformationen überspringen
Prof. Dr. Schlaumeier
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
Zitat
Original von MIKE bt
hab da noch was geunden:
sshd_conf:
...
#Match Group sftponly
# ChrootDirectory /JAIL/%u
# ForceCommand /usr/bin/ch_sftp
# X11Forwarding no
# AllowTcpForwarding no
Das hörte sich gut an, aber mein sshd startet dann nicht mehr, er kennt MATCH nicht.
Lt. Google sollte aber schon seit den späteren 3er Versionen diese Direktive bekannt sein.
Ich habe OpenSSH_4.2p1.
Quellcode |
|
1 2 3 4 5 6 |
sys.011: / # /etc/init.d/sshd start Starting SSH daemon/etc/ssh/sshd_config: line 120: Bad configuration option: Match /etc/ssh/sshd_config: line 121: Bad configuration option: ChrootDirectory /etc/ssh/sshd_config: line 122: Bad configuration option: ForceCommand /etc/ssh/sshd_config: terminating, 3 bad configuration options startproc: exit status of parent of /usr/sbin/sshd: 255 |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# $OpenBSD: sshd_config,v 1.72 2005/07/25 11:59:40 markus Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin # The strategy used for options in the default sshd_config shipped with # OpenSSH is to specify options with their default value where # possible, but leave them commented. Uncommented options change a # default value. Port <myport> #Protocol 2,1 #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress :: # Authentication: #LoginGraceTime 2m #PermitRootLogin yes StrictModes yes #MaxAuthTries 6 AllowGroups sftponly dc03process # To disable tunneled clear text passwords, change to no here! PasswordAuthentication no #PermitEmptyPasswords no UsePAM yes #AllowTcpForwarding yes #GatewayPorts no X11Forwarding no #X11DisplayOffset 10 # override default of no subsystems Subsystem sftp /usr/lib/ssh/sftp-server #Subsystem sftp internal-sftp # This enables accepting locale enviroment variables LC_* LANG, see sshd_config(5). AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT AcceptEnv LC_IDENTIFICATION LC_ALL Match Group sftponly ChrootDirectory /home/chroot/testuser/home/%u ForceCommand /home/chroot/testuser/usr/lib/ssh X11Forwarding no AllowTcpForwarding no |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/home/chroot/testuser = Root drwxr-xr-x 2 root root 1024 2009-06-12 08:02 bin drwxr-xr-x 2 root root 1024 2009-06-12 08:07 dev drwxr-xr-x 2 root root 1024 2009-06-12 08:07 etc drwxr-xr-x 3 root root 1024 2009-06-12 08:25 home drwxr-xr-x 3 root root 1024 2009-06-12 08:35 lib drwxrwxrwt 2 testuser sftponly 1024 2009-06-12 07:41 tmp drwxr-xr-x 4 root root 1024 2009-06-12 15:24 usr drwxr-xr-x 3 root root 1024 2009-06-12 07:41 var Struktur unter /home/chroot/testuser/home /user1 /user2 ... |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »MIKE bt« (14.06.2009, 19:53)