SSH connection failure: Server unexpectedly closed network connection


You may come across the following error message in the Aspera transfer log:

SSH connection failure: Server unexpectedly closed network connection

One of the most common causes of this error is the MaxStartups setting in the server's sshd_config file:

  • Linux: /etc/ssh/sshd_config
  • Windows: C:\Program Files[(x86)]\Aspera\[Aspera Product]\etc\sshd_config 

Linux example:

#MaxStartups 10

Windows example:

#MaxStartups 10:30:60

(The # in the sshd_config signifies the default).

These limit the number of unauthenticated SSH connections attempts to 10 (in the case of Windows, they start failing 30% of the time with 10, increasing to 100% at 60). In high concurrency environments, these values may be too low (especially if SSH is using TCP port 22, instead of the recommended TCP port 33001).


  • Product: Any
  • Operating System: Linux, Windows



We recommend changing the MaxStartups entry to 100:

MaxStartups 100

This would be the recommended setting on both Linux and Windows. (Notice, no # sign). Some customers in extremely high concurrency environments have increased this value to 500.

After this change, the SSHD process must be restarted for it to take effect:


Linux (RedHat)
sudo service sshd restart

Linux (Debian)
sudo /etc/init.d/ssh restart



Use the steps described in this article (Restarting SSH on Windows).

Powered by Zendesk