|
|
|||
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 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? Code:
me@host1> sftp user@host2 Connecting to host2... Password: Connection closed 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) Or is there another, even better way of allowing users to only use sft that is chrooted? Thanks hamba |
|
|||
Explain in more detail your setup, otherwise my possible response will not be usefull at all.
|
|
|||
Got it working but its not perfect
I had to mount mount devfs to /home/user/dev Code:
mount -t devfs dev /home/user/dev here are the step that should work but doesn't Code:
make_devfs() { # $1 is the user name whose home directory needs a minimal # devfs created. If ~/dev exists, it will be deleted. eval DEV="~$1/dev" while /sbin/umount "${DEV}" 2>/dev/null; do :; done /bin/rm -rf "${DEV}" /bin/mkdir -p "${DEV}" if /sbin/mount -t devfs dev "${DEV}"; then /sbin/devfs -m "${DEV}" rule -s 1 applyset && \ /sbin/devfs -m "${DEV}" rule -s 2 applyset || \ /sbin/umount "${DEV}" 2>/dev/null fi } Code:
devfs -m dev rule -s 1 applyset devfs rule: ioctl DEVFSIO_SAPPLY: No such process |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Chroot web-browsing | Oko | OpenBSD Security | 1 | 29th December 2008 01:37 PM |
read & modify files out side chroot jail | Dr_Death_UAE | FreeBSD Security | 5 | 6th November 2008 09:20 PM |
apache 2.2.8 , is it on chroot by default? | superslot | OpenBSD Security | 9 | 30th June 2008 11:56 AM |
Can't use bash on chroot'd openssh environment | jploh | FreeBSD General | 2 | 18th June 2008 02:12 AM |
chroot/jailing users | Weaseal | FreeBSD Security | 6 | 18th May 2008 07:44 AM |