Comments on Chrooted SSH/SFTP On Fedora 7
Chrooted SSH/SFTP On Fedora 7 This document describes how to set up a chrooted SSH/SFTP environment on Fedora 7. The chrooted users will be jailed in a specific directory where they can't break out. They will be able to access their jail via SSH and SFTP.
5 Comment(s)
Comments
I tried dot to dot on fedora 8. but still user is able to browse everything.
[geek@amd sbin]$ sftp [email protected]
Connecting to amd.slackme.org...
[email protected]'s password:
sftp> pwd
Remote working directory: /home/chroot/home/testuser
sftp> cd /
sftp> ls -l
drwxr-xr-x 2 root root 4096 Dec 21 23:07 bin
drwxr-xr-x 3 root root 4096 Dec 22 02:40 boot
drwxr-xr-x 6 geek geek 4096 Dec 22 02:47 data
drwxr-xr-x 13 root root 4360 Dec 22 16:21 dev
drwxr-xr-x 104 root root 12288 Dec 22 16:58 etc
drwxr-xr-x 4 root root 4096 Dec 22 16:19 home
drwxr-xr-x 15 root root 4096 Dec 21 23:07 lib
drwx------ 2 root root 16384 Dec 22 02:30 lost+found
drwxr-xr-x 5 root root 4096 Dec 22 16:07 media
drwxr-xr-x 2 root root 0 Dec 22 15:03 misc
drwxr-xr-x 2 root root 4096 Aug 13 20:17 mnt
drwxr-xr-x 2 root root 0 Dec 22 15:03 net
drwxr-xr-x 2 root root 4096 Aug 13 20:17 opt
dr-xr-xr-x 160 root root 0 Dec 22 20:33 proc
drwxr-x--- 30 root root 4096 Dec 22 16:07 root
drwxr-xr-x 2 root root 12288 Dec 21 23:07 sbin
drwxr-xr-x 2 root root 4096 Dec 22 02:31 selinux
drwxr-xr-x 3 root root 4096 Dec 22 02:41 srv
drwxr-xr-x 12 root root 0 Dec 22 20:33 sys
drwxrwxrwt 12 root root 4096 Dec 22 16:41 tmp
drwxr-xr-x 13 root root 4096 Dec 22 02:34 usr
drwxr-xr-x 22 root root 4096 Dec 22 02:43 var
sftp>
I added the script and all this and now it is giving me "access denied" everywhere I go.. why is this?
Think need to updated ..
fuschlberger.net/programs/ssh-scp-sftp-chroot-jail/
/Feras
Thanks for this really helpful tutorial! It's a bit old but also works under newer versions of Fedora.
http://chrootssh.sourceforge.net/download/openssh-4.5p1-chroot.tar.bz2
Doesn't exist anymore.