SFTP and FileZilla - Connection closed by server with exitcode 128

20,766

Solution 1

It might be an invalid .bashrc file. In my case I found it was referencing another recently deleted script, and so failed.

Solution 2

According to this site: http://forum.filezilla-project.org/viewtopic.php?f=2&t=17604, the problem is a bad username/password combination.

Solution 3

I had the same problem with one domain on my linux RHEL server. (My server requires ssh for security reasons.) I tried changing login and password and everything else.

What finally fixed it was in my WHM control panel, I disabled Shell Fork Bomb Protection. This feature limits ftp connections if there is a lot of traffic on the domain. When I disabled this, the ftp started working immediately and has worked ever since.

It has nothing to do with Filezilla or SCP setup. It is a matter or resources.

See http://docs.cpanel.net/twiki/bin/view/11_30/WHMDocs/ShellFork

Share:
20,766

Related videos on Youtube

Hafizur Rahman
Author by

Hafizur Rahman

Code enthusiast!

Updated on September 18, 2022

Comments

  • Hafizur Rahman
    Hafizur Rahman over 1 year

    This was working well until a couple of days ago. I can't recall having done anything to the server leading it to start closing the connection. Also I have no idea what exitcode 128 means, and can't find anything about it. Here's FileZilla's response to the connection attempt

    Status: Connecting to foo.bar.no...
    Response:   fzSftp started
    Command:    open "[email protected]" 22
    Command:    Pass: *******
    Status: Connected to foo.bar.no
    Error:  Connection closed by server with exitcode 128
    Error:  Could not connect to server
    

    Trying to connect with WinSCP also tells me the server closed the connection with error code 128 and additionally tells me:

    Cannot initialize SFTP protocol. Is the host running a SFTP server?
    

    I can SSH connect to the server no problem using PuTTY. Any ideas?

  • Hafizur Rahman
    Hafizur Rahman over 12 years
    I've tried rebooting the server and using passive mode. I've also tried changing the password which I don't see why would have worked, since I can log into SSH using PuTTY. Also this is the root account, so how can it be locked? :P
  • Hafizur Rahman
    Hafizur Rahman over 12 years
    My user account is root :P In addition, this netstat line shows that root is also running ssh tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN root 3960 1130/sshd.
  • MrGigu
    MrGigu almost 11 years
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.