Trouble getting sftp working.
Brought to you by:
xystrus
From: Ben B. <ben...@pr...> - 2003-09-01 13:07:13
|
Hi, My final goal is to have a chrooted sftp system setup but currently I can't even get the sftp to work in a non-chrooted environment.... Here is the output of ./configure: rssh-2.1.0# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets ${MAKE}... yes checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc checking for a BSD-compatible install... /usr/bin/install -c checking whether ln -s works... yes checking whether make sets ${MAKE}... (cached) yes checking for strip... strip checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking stdarg.h usability... yes checking stdarg.h presence... yes checking for stdarg.h... yes checking ctype.h usability... yes checking ctype.h presence... yes checking for ctype.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for unistd.h... (cached) yes checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking libgen.h usability... yes checking libgen.h presence... yes checking for libgen.h... yes checking wordexp.h usability... yes checking wordexp.h presence... yes checking for wordexp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking for gcc option to accept ANSI C... none needed checking for an ANSI C-conforming const... yes checking for stdlib.h... (cached) yes checking for working malloc... yes checking whether lstat dereferences a symlink specified with a trailing slash... yes checking whether stat accepts an empty string... no checking for memset... yes checking for strdup... yes checking for strtol... yes checking for strerror... yes checking for wordexp... yes checking for basename... yes checking for OpenSSH >= v3.5... no - v3.4 checking for scp... /usr/bin/scp checking for sftp-server... /usr/lib/sftp-server checking static compilation... static compilation ENABLED (detected old OpenSSH) configure: creating ./config.status config.status: creating Makefile config.status: creating main.c config.status: creating rssh_chroot_helper.c config.status: creating pathnames.h config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands unreal:/home/bbirnbaum/rssh-2.1.0# So it seems to detect everything okay and the compile completes without a hitch. I've got the user sftptest - it's entry in the passwd file is as follows: sftptest:x:1026:100::/home/chroot/home/sftptest:/usr/local/bin/rssh My rssh config is as follows: logfacility = LOG_USER # you can use comments at end of line #allowscp allowsftp umask = 022 #chrootpath="/usr/local/chroot dir" user=sftptest:011:10 So everything seems like it should work.....when I try sftp as the user I get: # sftp sftptest@192.168.8.3 Connecting to 192.168.8.3... sftptest@192.168.8.3's password: This account is restricted to sftp only. If you believe this is in error, please contact your system administrator. Connection closed # The log output is as follows: Sep 1 22:34:56 unreal rssh[21732]: setting log facility to LOG_USER Sep 1 22:34:56 unreal rssh[21732]: allowing sftp to all users Sep 1 22:34:56 unreal rssh[21732]: setting umask to 022 Sep 1 22:34:56 unreal rssh[21732]: line 30: configuring user sftptest Sep 1 22:34:56 unreal rssh[21732]: setting sftptest's umask to 011 Sep 1 22:34:56 unreal rssh[21732]: allowing sftp to user sftptest Sep 1 22:34:56 unreal rssh[21732]: user sftptest attempted to execute forbidden commands Sep 1 22:34:56 unreal rssh[21732]: command: sftp-server So I'm sort of at a loss as to why this isn't working ..... any advice would be greatly appreciated. Cheers Ben |