Secure Shell
Chrooted sftp setup accessible with psftp, but not sftp Jul 21 2009 01:17AM
Alex Jurkiewicz (alex bluebottle net au) (1 replies)
Re: Chrooted sftp setup accessible with psftp, but not sftp Jul 22 2009 02:45AM
Darren Tucker (dtucker zip com au) (1 replies)
Alex Jurkiewicz wrote:
> 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):

Those "other things" could well be the source of the problem, since
Match works first-match per config directive.

[...]
> 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

No, it has the same problem with sftp but falls back to using a shell,
which works:

Opened channel for session
Primary command failed; attempting fallback
Started a shell/command

> 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?

No, your server config is probably broken:

subsystem request for sftp
subsystem: cannot stat /usr/lib/openssh/sftp-server: No such file or
directory

however since you've trimmed the server logs you've removed the parts
that would have shown what Match did, so I have no idea what happened.

Please either post your entire config (or reduce your config to a subset
that you are willing to post), repeat the test with that config (use
sshd -f reduced_config if you don't use your real config) and show the
entire log.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

[ reply ]
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