[scponly] Re: Winscp and scponlyc

Lasse J. Kolb Lasse at bsn.ch
Mon Jan 12 20:04:42 EST 2004


On 12 Jan 2004 at 19:40, Sven Hoexter wrote:

> > * (ESshFatal) Cannot initialize SFTP protocol. Is the host running a SFTP server?
> > * Connection has been unexpectedly closed. Server sent command exit status 2.
> I would say take this literaly and make sure that your sshd has the sftp
> subsystemen running. You should find a line like this in your sshd_config
> Subsystem       sftp    /usr/lib/sftp-server

The line is present already.
Well, sftp in common works ...
But only with user markus for example, who has a normal shell. 
/bin/bash, and not the scponlyc.

User tina instead has in the passwd-file /usr/sbin/scponlyc

This is what I did after doing "apt-get install scponly" and chose 
"YES" when the program promt me for the chroot-mode:


I add an entry to /etc/shells: /usr/sbin/scponlyc

Modify the shell of the user I want to chroot in /etc/passwd:
... /usr/sbin/scponlyc

At least, I have to set the suit-bit to the file:
su -c "chmod +s /usr/sbin/scponlyc"

I also tried to do the sftp-option in Winscp, when I re-installed 
scponly on linux, but in the non-chroot-mode!
And that works also! So I guess .. the problem is more the 
chroot-part, than the sftp-protocol.

Regards,
Lasse
-- 
PGP: 0x4A1802C9 (RSA) · 0xBCF7BF1B (DSS/D-H)
Phone: +49 (0)5309/911462 · Fax: +49 (0)1212/511927288
Mobil: +49 (0)170/9020444 · http://www.bsn.ch/Lasse
ICQ: 5507446



More information about the scponly mailing list