Using public key SSH works, but SFTP gives error

opensusesftpsshxubuntu

On a server I installed openSUSE, configured SSH so only one user is allowed, only public key is allowed (no pam, no password), coming from specific IP.

SSH works, X11 forwarding works, SFTP works.

Now, I needed secondary system, pretty much identical as outer world is concerned. I installed Xubuntu, set SSH, firewall, I copied exactly the same SSH config and keys from openSUSE, and…

SSH works, X11 forwarding works, SFTP does not work.

I use FileZilla for connection, and it gives error "sftp received unexpected end-of-file from sftp server". I googled a bit, and found out advice to check "/var/log/auth.log" on the server so I did, and it is all rosy, when I try to connect using SFTP I see only single message "sshd[11835]: Accepted publickey for …".

What can be cause of such difference and how to fix it?

Best Answer

Finally found it. I tried other clients hoping one of them will bring new light, and indeed "sftp -v" did. The sshd config I copied was using external sftp server (which was present in openSUSE, but was not in Xubuntu). I changed it to internal server and now I can connect using Xubuntu as well.

Here is the post which helped: OpenSSH: Difference between internal-sftp and sftp-server