This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Chrooted ssh and SFTP in cygwin
- From: "RITTER, Philippe" <phr at cdm dot smis dot ch>
- To: <cygwin at cygwin dot com>
- Date: Thu, 11 Aug 2005 16:54:41 +0200
- Subject: Chrooted ssh and SFTP in cygwin
Hello
I'm trying to make a chrooted environnment in cygwin with
openssh-4.1p1-2
I can ssh with no problem, but sftp-server will not start because it
will not find cygwin1.dll in the path.
I use the chroot from http://chrootssh.sourceforge.net/download/
I looked in session.c but I don't understand when sshd set the path for
the session. I see it copies from windows, but not setting the default
Here the command I use to compile openssh :
./configure --prefix=/usr \
--sysconfdir=/etc \
--libexecdir='${sbindir}' \
--localstatedir=/var \
--datadir='${prefix}/share' \
--mandir='${datadir}/man' \
--infodir='${datadir}/info' \
--with-default-path='/usr/bin:/bin:/usr/sbin:/sbin' \
--with-tcp-wrappers
I my chrooted home I have :
$ ls -lR
.:
total 0
drwxr-xr-x+ 2 phr Domain Users 0 Aug 11 14:31 bin
drwxr-xr-x+ 2 phr Domain Users 0 Aug 11 16:20 etc
drwxr-xr-x+ 3 phr Domain Users 0 Aug 11 16:38 home
drwxr-xr-x+ 2 phr Domain Users 0 Aug 11 12:07 tmp
drwxr-xr-x+ 3 phr Domain Users 0 Aug 11 12:09 usr
drwxr-xr-x+ 3 phr Domain Users 0 Aug 11 14:24 var
./bin:
total 3792
-rwxr-xr-x 2 phr Domain Users 451072 Aug 11 12:08 bash
-rwxr-xr-x 2 phr Domain Users 451072 Aug 11 12:08 bash.exe
-rwxr-xr-x 1 phr Domain Users 6846 Aug 11 12:12 bashbug
-rwxr-xr-x 1 phr Domain Users 6656 Aug 11 12:07 cygcrypt-0.dll
-rwxr-xr-x 1 phr Domain Users 1015128 Aug 11 12:11 cygiconv-2.dll
-rwxr-xr-x 1 phr Domain Users 22016 Aug 11 12:11 cygintl-1.dll
-rwxr-xr-x 1 phr Domain Users 37888 Aug 11 12:11 cygintl-2.dll
-rwxr-xr-x 1 phr Domain Users 55612 Aug 11 12:11 cygintl-3.dll
-rwxr-xr-x 1 phr Domain Users 21504 Aug 11 12:11 cygintl.dll
-rwxr-xr-x 1 phr Domain Users 230400 Aug 11 14:12 cygncurses-8.dll
-rwxr-xr-x 1 phr Domain Users 147456 Aug 11 14:12 cygreadline6.dll
-rwxr-xr-x 1 phr Domain Users 1295582 Aug 11 12:08 cygwin1.dll
-rwxr-xr-x 1 phr Domain Users 89600 Aug 11 12:08 ls.exe
-rwxr-xr-x 1 phr Domain Users 23552 Aug 11 14:16 strace.exe
./etc:
total 8
-rwxr-x--- 1 phr Domain Users 6530 Aug 11 16:20 profile
./home:
total 0
./tmp:
total 0
./usr:
total 0
drwxr-xr-x+ 2 phr Domain Users 0 Aug 11 14:31 sbin
./usr/sbin:
total 1076
-rwxr-xr-x 1 phr Domain Users 1067008 Aug 11 12:07 cygcrypto-0.9.8.dll
-rwxr-xr-x 1 phr Domain Users 29184 Aug 11 12:09 sftp-server.exe
./var:
total 0
drwxr-xr-x+ 2 phr Domain Users 0 Aug 11 14:23 run
./var/run:
total 0
Can someone help me ? I know I could copy everything from /bin in
/usr/sbin, but I would like something else.
Thanks
Philippe RITTER
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/