[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

chroot jail for user with rssh



hello,
i try ro setup a chroot jail with rssh.

the jail seem to work if I set /bin/bash as shell.
(I get a prompt and can ls inside chroot)

When I set /usr/bin/rssh as login shell i get:

ssh user@example.com
This account is restricted by rssh.
Allowed commands: scp sftp rsync

sftp -vv user@example.com
Transferred: sent 2508, received 2260 bytes, in 0.2 seconds
Bytes per second: sent 15924.1, received 14349.5
debug1: Exit status 1
Connection closed


scp -vv user@example.com:/foo /tmp
Transferred: sent 2508, received 2304 bytes, in 0.2 seconds
Bytes per second: sent 15051.0, received 13826.7
debug1: Exit status 255

I have also try to set /usr/bin/rssh in /etc/shells but get the same result.

Files inside chroot:

/home/user# find ./
./
./bin
./bin/ls
./bin/date
./bin/bash
./.ssh
./.ssh/authorized_keys
./lib
./lib/x86_64-linux-gnu
./lib/x86_64-linux-gnu/libattr.so.1
./lib/x86_64-linux-gnu/libncurses.so.5
./lib/x86_64-linux-gnu/librt.so.1
./lib/x86_64-linux-gnu/libbsd.so.0
./lib/x86_64-linux-gnu/libpthread.so.0
./lib/x86_64-linux-gnu/libacl.so.1
./lib/x86_64-linux-gnu/libdl.so.2
./lib/x86_64-linux-gnu/libpopt.so.0
./lib/x86_64-linux-gnu/libpcre.so.3
./lib/x86_64-linux-gnu/libselinux.so.1
./lib/x86_64-linux-gnu/libtinfo.so.5
./lib/x86_64-linux-gnu/libc.so.6
./etc
./etc/group
./etc/rssh.conf
./etc/passwd
./foo
./usr
./usr/bin
./usr/bin/rssh
./usr/bin/sftp
./usr/bin/rsync
./usr/bin/scp
./usr/lib
./usr/lib/x86_64-linux-gnu
./usr/lib/x86_64-linux-gnu/libedit.so.2
./dev
./dev/random
./dev/zero
./dev/null
./dev/tty
./lib64
./lib64/ld-linux-x86-64.so.2

I have no idea anymore whats wrong and how can I debug.

Best Regards,


Reply to: