OpenSSH SFTP cannot connect

Kernels & Hardware, configuring network, installing services

OpenSSH SFTP cannot connect

Postby naithen » 2009-08-01 01:55

Hi,
I have installed OpenSSH and configured the SFTP subsystem, SSH works fine and SFTP works with WinSCP. My problem is when I try to connect using sftp in localhost I get the error:
Code: Select all
subsystem request failed on channel 0
Couldn't read packet: Connection reset by peer


With sftp -v the output is;
Code: Select all
####@localhost's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_GB.UTF-8
debug1: Sending subsystem: sftp
subsystem request failed on channel 0
Couldn't read packet: Connection reset by peer


Having a look at /var/log/auth.log shows no unusual outputs;
Code: Select all
sshd[11229]: Accepted password for #### from 127.0.0.1 port 45831 ssh2
sshd[11229]: pam_unix(sshd:session): session opened for user #### by (uid=0)
sshd[11231]: subsystem request for sftp
sshd[11229]: pam_unix(sshd:session): session closed for user ####


My /etc/ssh/sshd_config has
Code: Select all
Subsystem sftp /usr/lib/openssh/sftp-server

UsePAM yes

Match Group sftponly
        PasswordAuthentication yes
        ChrootDirectory %h
        AllowTCPForwarding no
        X11Forwarding no
        ForceCommand internal-sftp


(I'm chrooting the sftp and trying to test that)

I'm running Lenny with OpenSSH_5.1p1

Any help is very much appreciated.

Thanks,
User avatar
naithen
 
Posts: 213
Joined: 2008-03-03 15:33

Re: OpenSSH SFTP cannot connect

Postby naithen » 2009-08-12 08:41

This was sorted after changing
Code: Select all
Subsystem sftp /usr/lib/openssh/sftp-server
to
Code: Select all
Subsystem sftp internal-sftp

:)
User avatar
naithen
 
Posts: 213
Joined: 2008-03-03 15:33


Return to System configuration

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable