DEV Community

hemanlinux
hemanlinux

Posted on

Cannot connect to sftp server

Cannot connect to sftp server — “Too many authentication failures for user”
I faced this issue when trying to use Filezilla client to access a remote ftp location.

The initial stack trace ( with debug level set to 3) is as follows.

Trace:   Trying Pageant key #0
Trace:   Server refused public key
Trace:   Trying Pageant key #1
Trace:   Server refused public key
Trace:   Trying Pageant key #2
Trace:   Received disconnect message (protocol error)
Trace:   Disconnection message text: Too many authentication failures for facade
Trace:   Server sent disconnect message
Trace:   type 2 (protocol error):
Trace:   "Too many authentication failures for facade"
Error:   Server sent disconnect message
Error:   type 2 (protocol error):
Error:   "Too many authentication failures for facade"
Trace:   CSftpControlSocket::ResetOperation(66)
Trace:   CControlSocket::ResetOperation(66)
Error:   Could not connect to server
Status:   Waiting to retry...

Enter fullscreen mode Exit fullscreen mode

Thanks to this post:

https://www.howtouselinux.com/post/2-ways-to-fix-ssh-too-many-authentication-failures

I identified that the reasons for this issue are follows.

  • At the time of the issue, I had used “ssh-add” to add several keys for accessing multiple other instances.
  • FileZilla does’t know which keys it needs to try and tries every available keys
  • The server had set a maximum retry count (3) and as I had more than 3 keys, FileZilla failed after trying only 3 keys.

Top comments (0)