Secure Shell
Chrooted sftp setup accessible with psftp, but not sftp Jul 21 2009 01:17AM
Alex Jurkiewicz (alex bluebottle net au) (1 replies)
Hi all,

I'm having problems with a chrooted sftp set up. I can connect with
the psftp program from the Putty toolkit, but not with the standard
sftp utility.
OpenSSH is the same on the client and server:
OpenSSH_5.1p1Debian-5ubuntu1, OpenSSL 0.9.8g 19 Oct 2007

My server configuration is as follows:

sshd_config contains (among other things):
Subsystem sftp /usr/lib/openssh/sftp-server
Match group sftponly
ChrootDirectory /home/%u
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

The user is part of the group sftponly, this is the passwd entry:
user:x:1003:1004:Username,,,:/home/user:/bin/false

/home/user is:
drwxr-x--- 4 root user 4.0K 2009-07-19 22:12 /home/user/

Connecting with psftp works, here is the sshd log:
http://www.bluebottle.net.au/putty-sshd.txt
And the client log:
http://www.bluebottle.net.au/putty-psftp.txt

However, connecting with sftp(1) doesn't, see the two logs here:
http://www.bluebottle.net.au/sftp-sshd.txt
http://www.bluebottle.net.au/sftp-sftp.txt

I'm not quite sure why this isn't working, is sftp failing to send a
needed command?

Cheers,
AJ

[ reply ]
Re: Chrooted sftp setup accessible with psftp, but not sftp Jul 22 2009 02:45AM
Darren Tucker (dtucker zip com au) (1 replies)
Re: Chrooted sftp setup accessible with psftp, but not sftp Jul 22 2009 03:41AM
Alex Jurkiewicz (alex bluebottle net au)


 

Privacy Statement
Copyright 2010, SecurityFocus