View Single Post
  #1   (View Single Post)  
Old 15th May 2008
hamba hamba is offline
Fdisk Soldier
 
Join Date: Apr 2008
Posts: 71
Default scponly not working with chroot

Hi

I'm having trouble setting up scponly. I can get it working when the shell is set to /usr/local/bin/scponly but not to /usr/local/sbin/scponlyc

I followed all the steps
Code:
cd /usr/local/share/examples/scponly/ && /bin/sh setup_chroot.sh
and follow the instructions

But when it comes time to test the account I'm getting this message from winscp
Code:
Cannot initialize SFTP protocol. Is the host running a SFTP server?
and from a shell account
Code:
me@host1> sftp user@host2
Connecting to host2...
Password:
Connection closed
here is what I see in my logs
Code:
May 15 14:54:00 host2 sshd[75239]: Accepted keyboard-interactive/pam for user from 192.168.xx.xxx port 55072 ssh2
May 15 14:54:00 host2 sshd[75242]: subsystem request for sftp
May 15 13:54:00 host2 scponly[75243]: running: /usr/libexec/sftp-server (username: user(1003), IP/port: 192.168.xx.xxx 55072 22)
Does anyone have an idea why this is happening and how I can fix this?
Or is there another, even better way of allowing users to only use sft that is chrooted?

Thanks
hamba
Reply With Quote