ssh - restricted shell
daniel
danstemporaryaccount at yahoo.ca
Wed Mar 30 13:51:27 PST 2005
On March 30, 2005 04:02 pm, Duane Winner wrote:
> Hello,
>
> Does anybody know the best technique to accomplish this:
>
> We have a server that we use for mostly internal development, and run an
> SSH server.
>
> We have an outsider who we want to allow to ssh into this server and do
> some work.
>
> However, because he is an outsider, we don't want him roaming around our
> server, moving, looking, doing, or anything outside of his own home
> directory.
>
> How can I restrict him to his own home directory?
>
> I thought I ran into instructions once for doing this, but I can't find
> anything right now.
>
> Or was I thinking of scponly ?
>
> That might do it, except we do need to set him up to to run some scripts
> within his home directory after he uploads stuff via scp.
if you only want scp to work, then you can use this as the shell:
/usr/lib/misc/sftp-server
worked for me. however, if they need a shell, you'll have to chroot() the
shell and i don't know how to do that. i've never bothered to learn 'cause
i've heard that they're easy to break out of anyway.
--
the reasonable man adapts himself to the world;
the unreasonable man persists in trying to adapt the world to himself.
therefore, all progress depends on the unreasonable man.
- george bernard shaw
More information about the freebsd-questions
mailing list