On Mon, Nov 09, 2009 at 01:34:30AM +0100, PÁSZTOR György wrote: > Hi! > > Have anyone did a working rssh setup with user chroot in a vserver? > > I did this in the users chroot: > mkdir usr > mkdir usr/lib > mkdir usr/lib/openssh > ln -s usr/lib lib > ln -s usr/lib lib64 > ldd /usr/lib/openssh/sftp-server | while read name eq rname dummy ; do > cp $rname lib ; done > # It lefts out the ld-linux, so do it manually: > cp /lib/ld-linux-x86-64.so.2 lib > cp /usr/lib/openssh/sftp-server usr/lib/openssh > mkdir dev > cp -a /dev/null dev > chmod +s /usr/lib/rssh/rssh-chroot-helper > > Then, When I try to log in, I see this at client side: > > Connection closed > Couldn't initialise connection to server > yafc> > > And I see the following in the vserver's syslog: > Nov 9 01:20:15 ssh rssh[31206]: setting log facility to LOG_USER > Nov 9 01:20:15 ssh rssh[31206]: allowing scp to all users > Nov 9 01:20:15 ssh rssh[31206]: allowing sftp to all users > Nov 9 01:20:15 ssh rssh[31206]: setting umask to 022 > Nov 9 01:20:15 ssh rssh[31206]: line 51: configuring user iw > Nov 9 01:20:15 ssh rssh[31206]: setting iw's umask to 022 > Nov 9 01:20:15 ssh rssh[31206]: allowing scp to user iw > Nov 9 01:20:15 ssh rssh[31206]: allowing sftp to user iw > Nov 9 01:20:15 ssh rssh[31206]: chrooting iw to /srv/sites/iw > Nov 9 01:20:15 ssh rssh[31206]: chroot cmd line: /usr/lib/rssh/rssh_chroot_helper 2 "/usr/lib/openssh/sftp-server" > Have sy. any idea about where the problem is, or how to solve it? my best guess would be that the last command fails (for whatever reason) i.e. the /usr/lib/rssh/rssh_chroot_helper 2 "/usr/lib/openssh/sftp-server" I'd say adding some debug/log stuff to that might sched some light what actually goes wrong ... HTH, Herbert > Thanks!