Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jun 2003 11:27:02 -0400
From:      Raymond Sundland <raymond@sundland.com>
To:        Rob Lahaye <lahaye@users.sourceforge.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: creating ftp users!
Message-ID:  <3EF71C46.1060605@sundland.com>
In-Reply-To: <3EF70B5B.1020508@users.sourceforge.net>
References:  <20030613125624.87202.qmail@web13407.mail.yahoo.com> <3EF7072C.7020908@users.sourceforge.net> <3EF707EB.1060406@sundland.com> <3EF70B5B.1020508@users.sourceforge.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Rob,

If you want a nice message, I suggest creating a class in
/etc/logins.conf which point to a /etc/issues.sftponly file where the
user gets a nice message, which you deem appropriate.

Secondly, as far as chroot, I don't believe OpenSSH supports chroot
natively, however I know there is a patch floating around (I believe in
the contrib/ directory of the openssh portable tarball) which will patch
openssh to support chroot'd environments.  You will need to recompile
the openssh portable distribution, however.



Rob Lahaye wrote:
> Raymond Sundland wrote:
> 
>>Rob,
>>
>>You can try setting the user's shell to /usr/libexec/sftp-server (or 
>>wherever the sftp-server binary exists under FreeBSD).
>>
>>This will give the user ability to SFTP into the box, but without a 
>>normal shell.  /usr/lib/exec/sftp-server should be added to /etc/shells, 
>>too.
> 
> 
> Almost works ;).
> Doing what you suggest, I can sftp to the account, but when I do ssh to
> that account, I get the regular login message but no prompt. Something
> seems to hang. When I type something and hit return, I get:
> 
> 
> bad message
> Connection to foo.bar.com closed.
> $
> 
> It somehow blocks ssh login indeed, but it's not very nice!
> 
> 
> BTW will sftp also work with the /etc/chroot file?
> 
> Thanks,
> Rob.
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EF71C46.1060605>