Chroot issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to chroot shell access (not sftp) using the ForceComand internal-sftp OpenSSH_5.1p1 it hangs on: debug2: shell request accepted on channel 0

Here is my sshd_config and the trace (from where the forcecommand internal-sftp is loaded) Any ideas? http://pastebin.com/m3637f3c6

Maybe it's not possible to have a chroot shell access using the internal-sftp?

I've tried adding the following to my chroot:

<script>
mkdir etc
mkdir bin
mkdir lib
mkdir usr
mkdir usr/bin
mkdir dev
mknod dev/null c 1 3
mknod dev/zero c 1 5
APPS="/bin/bash /bin/cp /usr/bin/dircolors /bin/ls /bin/mkdir /bin/mv / bin/rm /bin/rmdir /bin/sh /bin/su /usr/bin/groups /usr/bin/id /usr/bin/ nc /usr/bin/rsync /usr/bin/ssh /usr/bin/scp"
for prog in $APPS;  do
        cp -p $prog ./$prog

        # obtain a list of related libraries
        ldd $prog > /dev/null
        if [ "$?" = 0 ] ; then
                LIBS=`ldd $prog | awk '{ print $3 }'`
                for l in $LIBS; do
                        mkdir -p ./`dirname $l` > /dev/null 2>&1
                        cp $l ./$l
                done
        fi
done


Any ideas?


-Bret

[Index of Archives]     [Open SSH Unix Development]     [Fedora Users]     [Fedora Desktop]     [Yosemite Backpacking]     [KDE Users]     [Gnome Users]

  Powered by Linux