[Chrootssh-users] Connection to system closed by remote host
Brought to you by:
punkball
From: Timothy G. P. <tip...@du...> - 2004-06-16 23:11:47
|
I am setting up chroot ssh on SuSE linux 9.1 and am at the same point Greg McCann was two weeks ago. I followed the advice given in his follow-up post, but am still having problems. I can chroot just fine, and ssh as a non-chroot user, but connecting as a chroot user gets me disconnected (after authenticating okay). Here's the /etc/passwd entry for my user: test_chroot:x:1003:1002::/home/chrooted/./home/test_chroot:/bin/sh Here's the contents of /home/chrooted: 313961 0 drwxr-xr-x 8 root root 192 Jun 16 17:06 . 313954 0 drwxrwxrwx 2 test_chr chrooted 648 Jun 15 17:47 ./bin 313957 2914 -rwxr-xr-x 1 nobody nobody 2978445 Jun 15 17:30 ./bin/cp 313958 2546 -rwxr-xr-x 1 nobody nobody 2601319 Jun 15 17:30 ./bin/df 313959 2670 -rwxr-xr-x 1 nobody nobody 2728798 Jun 15 17:30 ./bin/du 313963 3083 -rwxr-xr-x 1 nobody nobody 3149834 Jun 15 17:30 ./bin/ls 313964 2946 -rwxr-xr-x 1 nobody nobody 3014128 Jun 15 17:30 ./bin/mv 313965 2534 -rwxr-xr-x 1 nobody nobody 2590303 Jun 15 17:30 ./bin/od 313966 2770 -rwxr-xr-x 1 nobody nobody 2833980 Jun 15 17:30 ./bin/rm 313952 0 lrwxrwxrwx 1 nobody nobody 4 Jun 15 17:43 ./bin/sh -> bash 313968 2438 -rwxr-xr-x 1 nobody nobody 2492614 Jun 15 17:30 ./bin/wc 313969 2422 -rwxr-xr-x 1 nobody nobody 2477082 Jun 15 17:30 ./bin/cat 313970 2426 -rwxr-xr-x 1 nobody nobody 2481114 Jun 15 17:30 ./bin/pwd 313971 2430 -rwxr-xr-x 1 nobody nobody 2486090 Jun 15 17:30 ./bin/tee 313759 4860 -rwxr-xr-x 1 nobody nobody 4968716 Jun 15 17:43 ./bin/bash 313973 2582 -rwxr-xr-x 1 nobody nobody 2641090 Jun 15 17:30 ./bin/date 313974 2466 -rwxr-xr-x 1 nobody nobody 2519216 Jun 15 17:30 ./bin/head 313975 2518 -rwxr-xr-x 1 nobody nobody 2575533 Jun 15 17:30 ./bin/tail 313976 2482 -rwxr-xr-x 1 nobody nobody 2539265 Jun 15 17:30 ./bin/stty 313977 2426 -rwxr-xr-x 1 nobody nobody 2480643 Jun 15 17:30 ./bin/cksum 313978 2458 -rwxr-xr-x 1 nobody nobody 2511014 Jun 16 16:34 ./bin/mkdir 313979 2414 -rwxr-xr-x 1 nobody nobody 2466541 Jun 16 16:34 ./bin/rmdir 313980 2454 -rwxr-xr-x 1 nobody nobody 2509243 Jun 15 17:30 ./bin/touch 313981 2458 -rwxr-xr-x 1 nobody nobody 2511544 Jun 15 17:30 ./bin/sha1sum 313982 2430 -rwxr-xr-x 1 nobody nobody 2484079 Jun 16 16:34 ./bin/chroot 313983 2458 -rwxr-xr-x 1 nobody nobody 2511518 Jun 15 17:30 ./bin/md5sum 313985 2418 -rwxr-xr-x 1 nobody nobody 2470940 Jun 15 17:30 ./bin/printenv 307579 0 drwxr-xr-x 2 root root 120 Jun 16 16:17 ./dev 312902 0 crw-rw-rw- 1 root root Jun 16 16:17 ./dev/null 312890 0 crw-rw-rw- 1 root root Jun 16 16:17 ./dev/zero 313997 0 crw-rw-rw- 1 root root Jun 16 16:17 ./dev/urandom 314838 0 drwxr-xr-x 2 root root 80 Jun 16 16:25 ./etc 314839 120 -rw-r--r-- 1 root root 121901 Jun 16 16:23 ./etc/ld.so.cache 313999 0 drwxr-xr-x 3 root root 296 Jun 16 16:39 ./lib 314846 0 drwxr-xr-x 2 root root 80 Jun 16 16:25 ./lib/tls 314835 1321 -rwxr-xr-x 1 root root 1349081 Jun 16 16:22 ./lib/tls/libc.so.6 314829 76 -rwxr-xr-x 1 root root 74342 Jun 16 16:21 ./lib/libresolv.so.2 314832 72 -rwxr-xr-x 1 root root 70484 Jun 16 16:22 ./lib/libz.so.1 314833 88 -rwxr-xr-x 1 root root 88036 Jun 16 16:22 ./lib/libnsl.so.1 314831 12 -rwxr-xr-x 1 root root 10797 Jun 16 16:21 ./lib/libutil.so.1 314834 44 -rwxr-xr-x 1 root root 43632 Jun 16 16:22 ./lib/libcrypt.so.1 314837 104 -rwxr-xr-x 1 root root 104484 Jun 16 16:22 ./lib/ld-linux.so.2 314836 16 -rwxr-xr-x 1 root root 13647 Jun 16 16:22 ./lib/libdl.so.2 314840 0 drwxr-xr-x 5 root root 120 Jun 16 16:40 ./usr 314845 0 drwxr-xr-x 2 root root 344 Jun 16 16:32 ./usr/etc 314850 4 -rw-r--r-- 1 root root 1159 Jun 16 16:32 ./usr/etc/ssh_config 314841 4 -rw-r--r-- 1 root root 2515 Jun 16 16:32 ./usr/etc/sshd_config 314842 4 -rw------- 1 root root 524 Jun 16 16:32 ./usr/etc/ssh_host_key 314851 4 -rw-r--r-- 1 root root 599 Jun 16 16:32 ./usr/etc/ssh_host_dsa_key.pub 314853 4 -rw-r--r-- 1 root root 219 Jun 16 16:32 ./usr/etc/ssh_host_rsa_key.pub 314849 112 -rw-r--r-- 1 root root 111892 Jun 16 16:32 ./usr/etc/moduli 314852 4 -rw-r--r-- 1 root root 328 Jun 16 16:32 ./usr/etc/ssh_host_key.pub 314844 4 -rw------- 1 root root 668 Jun 16 16:32 ./usr/etc/ssh_host_dsa_key 314843 4 -rw------- 1 root root 883 Jun 16 16:32 ./usr/etc/ssh_host_rsa_key 314847 0 drwxr-xr-x 2 root root 88 Jun 16 16:39 ./usr/lib 314830 1105 -rwxr-xr-x 1 root root 1127023 Jun 16 16:21 ./usr/lib/libcrypto.so.0.9.7 314848 0 drwxr-xr-x 3 root root 72 Jun 16 16:40 ./usr/local 314854 0 drwxr-xr-x 2 root root 80 Jun 16 16:40 ./usr/local/libexec 314855 28 -rwxr-xr-x 1 root root 27176 Jun 16 16:40 ./usr/local/libexec/sftp-server 313951 0 drwxr-xr-x 3 root root 80 Jun 16 14:52 ./home 279618 0 drwxr-xr-x 2 test_chr chrooted 80 Jun 16 16:02 ./home/test_chroot 306507 4 -rw------- 1 test_chr chrooted 5 Jun 16 16:02 ./home/test_chroot/.bash_history I hope that's not too unreadable. I really don't know what I'm missing, and I've been poking around at this for some time. If anyone (Greg?) can respond with their /path/to/chroot directory listing or point out where I'm wrong... Thanks! Tim |