0

I have dedicated server with Ubuntu Server 16.04 + VestaCP. SSH access works perfectly, but SFTP has broken down. I do not know when it broke, but before that everything worked as expected.

When i connect to sftp from local mashine, it is works:

Mar  6 13:52:37 local sftp-server[2120]: session opened for local user user1 from [10.10.80.120]
Mar  6 13:52:37 local sftp-server[2120]: received client version 3
Mar  6 13:52:37 local sftp-server[2120]: debug3: request 1: realpath
Mar  6 13:52:37 local sftp-server[2120]: realpath "."
Mar  6 13:52:37 local sftp-server[2120]: debug1: request 1: sent names count 1

When i try to do it from remote host, i get 1 line:

Mar  6 19:34:06 server sftp-server[3545]: session opened for local user root from [xxx.xxx.xxx.xxx]

Nothing happens and connection down by timeout. I do not get any errors and can not determine the cause of this problem.

I have default settings in /etc/ssh/sshd_config:

Subsystem sftp /usr/lib/openssh/sftp-server -l debug3

I dont want replace it to internal-sftp. This should work without changes,because it worked before.

  • Check your firewall configurations – DavidPostill Mar 7 '18 at 8:13
  • 1
    Are you connecting to the same host (local vs. server)? Also I would try connecting as the same user (user1 vs. root). – Ivan Mar 7 '18 at 8:33
  • 1
    DavidPostill, what farewall do you mean? Netfilter disabled. Fail2ban does not writes my ip-address in log. What can block it? – karpo518 Mar 7 '18 at 8:51
  • Ivan, both вoth users do not work, but worked before. I tryed both users from same and remote host – karpo518 Mar 7 '18 at 8:57
0

When an SFTP client connects to an SFTP server, the first data exchange to take place is for the client to send its SFTP protocol version to the server. The server responds with the SFTP protocol version that it is willing to use for the session, and then the client and server proceed from there.

You can see in your first log example that the client sent its version to the server:

Mar 6 13:52:37 local sftp-server[2120]: received client version 3

That line is missing from the second log sample. The simplest explanation for that is the client never sent it.

In short, it looks like the SFTP client being used in the second case is malfunctioning. It's not sending the message that it's supposed to send to start the SFTP exchange.

  • I think, it is server side problem. I tried using the same sftp client to connect to another server. The other server uses the same software. I successfully connected to another server through the same client. I also used other sftp clients. All of them work correctly with another server, but they can not connect to this server. I used default client settings in all cases – karpo518 Mar 8 '18 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.