You are not logged in.

#1 2008-03-11 06:31:15

jimmyeatapple
Member
Registered: 2008-03-11
Posts: 8

SFTP Woes in a CHROOTed environment

Hello all,

I tried not to make the newbie mistake and searched around a bit on the forums for an answer to this but have come up empty. I'll keep this short.

Purpose: Create an archlinux server on a vm to handle sftp(ssh) and possibly scp. It will serve shares located on another machine. Chroot's purpose is to lock the new users from the system and only let them access the read only samba shares.

System: Its running in VMware, network bridged mode. Has enough ram, and runs great. After the base install I added samba, openssh-chroot (I installed both of these following the wiki entry on this site)

Problem: I cannot get sftp to work. It will always give me "Request for subsystem 'sftp' failed on channel 0

Quirks and Facts: 1. I could get into sftp BEFORE I installed openssh-chroot
2. I could get into ssh BEFORE I installed openssh-chroot (and it worked great!)
3. At first I could not get into ssh AFTER I installed openssh-chroot, It required I copy my /etc/security folder to /chroot/etc, then ssh worked
4. Upon login via ssh I get "ls: connot access /etc/profile.d/: No such file or directory", but all seems hunky dory after that
5. My /etc/ssh/sshd_config file has only 5 uncommented (or un #'ed lines), they are:
   ListenAddress 0.0.0.0
   Protocal 2
   ChallengeResponseAuthentication no
   UsePAM yes
   Subsystem      sftp   /usr/lib/ssh/sftp-server
The rest of the lines have a # at the beginning
6. sshd has been added to the startup daemons
7. chroot /chroot/ /bin/bash worked right away AFTER I installed openssh-chroot

I would really really really appreciate any help, because I am stumped at the moment. I am guessing some part of sftp is not in the openssh-chroot config files? Does that even make sense? I don't know. I am pretty new to linux so any and all help would be appreciated.

Offline

#2 2008-03-11 16:12:59

jimmyeatapple
Member
Registered: 2008-03-11
Posts: 8

Re: SFTP Woes in a CHROOTed environment

Almost forgot, this is what my hosts.allow looks like

ALL: localhost
sshd: ALL

Offline

Board footer

Powered by FluxBB