I'm having a problem setting up SFTP with an Ubuntu Server 10.04 LTS x64.
I use openSSH with public key authentication, I can login with SSH perfectly with the keys no problem. I can also connect to the FTP server, but I can't write, download or any files from the folder.
thomas thomas_filetransfer (home directory is "/" and is part of group "filetransfer")
Not all, just the essentials for SFTP configuration:
Protocol 2 HostKey /etc/ssh/ssh_host_rsa_key LogLevel VERBOSE PermitRootLogin no RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile /etc/ssh/authorized_keys #might be the problem? IgnoreRhosts yes RhostsRSAAuthentication no HostbasedAuthentication no PermitEmptyPasswords no ChallengeResponseAuthentication no PasswordAuthentication yes X11Forwarding no UsePAM no UseDNS no AllowUsers thomas thomas_filetransfer Subsystem sftp internal-sftp Match group filetransfer ChrootDirectory /var/www X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp
/var/www = owner = root, group = root, permissions = rwxr-x--- (750) /etc/ssh = owner = root, group = root, permissions = rwxr-xr-x (755) /etc/ssh/authorized_keys = owner = root, group = root, permissions = -rw-r--r-- (600)
And again, SSH is working perfectly. I set up the private and public keys and they work, SFTP login works also, but when I try to upload/download a file, it get's wrong.
When I authenticate with my ssh box from a remote box I found this in my /var/log/auth.log file, don't know if anything has to do with it anyway:
Connection from 192.168.124.1 port 54993 Failed none for thomas_filetransfer from 192.168.124.1 port 54993 ssh2 Found matching RSA key: b4:a3:3d:18:b9:30:0c:60:e6:2b:31:47:a9:8d:1d:53 Found matching RSA key: b4:a3:3d:18:b9:30:0c:60:e6:2b:31:47:a9:8d:1d:53 Accepted publickey for thomas_filetransfer from 192.168.124.1 port 54993 ssh2 User child is on pid 849
The second line says "failed none for ..."