Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Apr 2007 18:32:46 +0200
From:      "Helmut Schneider" <jumper99@gmx.de>
To:        <freebsd-ports@freebsd.org>
Cc:        rushani@FreeBSD.org
Subject:   Re: scponlyc
Message-ID:  <001401c78044$ddc93130$609b65c1@vpe.de>
References:  <00a201c7777f$6d5de350$609b65c1@vpe.de>

next in thread | previous in thread | raw e-mail | index | archive | help
From: "Helmut Schneider" <jumper99@gmx.de>

> currently I am very frustrated because I'm trying to get scponlyc
> running. I  successfully use it on OpenBSD for many years now.
>
> According to 
> http://lists.freebsd.org/pipermail/freebsd-questions/2007-January/139866.h
> tml I  mounted devfs to my jail:
>
> [root@orakel /usr/ports/shells/scponly]# mount | grep devfs
> devfs on /dev (devfs, local)
> devfs on /var/www/dev (devfs, local)
> [root@orakel /usr/ports/shells/scponly]#
>
> I ran /usr/local/share/examples/scponly/setup_chroot.sh and created the
> user  and the jail.
>
> But when I try to connect using
> - SSH Secure File Transfer
> - WinSCP
> - sftp
> - ssh
> - scp
> I can't connect to the machine:
>
> [root@orakel /usr/ports/shells/scponly]# sftp dd@localhost
> Connecting to localhost...
> Password:
> Connection closed
> [root@orakel /usr/ports/shells/scponly]# chroot -u dd /var/www/ 
> /usr/libexec/sftp-server
> ^C
> [root@orakel /usr/ports/shells/scponly]# ssh dd@localhost
> Password:
> Last login: Thu Apr  5 14:30:50 2007 from localhost
> Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
> The Regents of the University of California.  All rights reserved.
>
> FreeBSD 6.2-RELEASE-p3 (SMP-GENERIC) #0: Thu Mar 22 23:34:02 CET 2007
>
> Welcome to FreeBSD!
>
> [...]
>
> WinSCP: this is end-of-file:0
> ^CConnection to localhost closed.
> [root@orakel /usr/ports/shells/scponly]# scp Makefile dd@localhost:/tmp/
> Password:
> scponlyc in free(): error: junk pointer, too low to make sense
> lost connection
> [root@orakel /usr/ports/shells/scponly]# ls -la /var/www/tmp/
> total 4
> drwxrwxrwx   2 root   daemon  512 Mar 26 13:21 .
> dr-xr-xr-x  16 root   daemon  512 Apr  5 13:52 ..
> [root@orakel /usr/ports/shells/scponly]#
>
> scponly-4.6_1 is compiled from the ports with:
> '-DWITH_SCPONLY_CHROOT',
> '-DWITH_SCPONLY_SCP',
> '-DWITH_SCPONLY_SFTP_LOGGING',
> '-DWITH_SCPONLY_WINSCP',
>
> I am really depressed now, could someone please point me to a
> enlightening  place to bring back joy to my life?

OK, ./setup_chroot.sh does not like special characters as password.

PoC: Use setup_chroot.sh to create a new user and use a password with an 
exclamation mark at the end (like "password!")

All scp/sftp Clients will fail with exit status 255.

Cheers, Helmut 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001401c78044$ddc93130$609b65c1>