IBM Support

SSH connection failure: Server unexpectedly closed network connection

Question & Answer


Question

SSH connection failure: Server unexpectedly closed network connection

Answer

Issue

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).

Environment

  • Product: Any
  • Operating System: Linux Windows

Solution

We recommend changing theMaxStartups 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

Linux (RedHat)
sudo service sshd restart

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

Windows

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

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS8NDZ","label":"IBM Aspera"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
08 December 2018

UID

ibm10746411