You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/windows-server/system-management-components/troubleshoot-openssh-connection-issues-maxstartups-maxsessions.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,13 +17,13 @@ appliesto:
17
17
# How to use "MaxStartups" and "MaxSessions" to troubleshoot OpenSSH connection issues
18
18
19
19
This guide explains how to use the `MaxStartups` and `MaxSessions` parameters to limit client connections to the OpenSSH Server service.
20
-
These settings help you troubleshoot connection issues and to manage unauthenticated and authenticated SSH sessions, especially in high-load environments.
20
+
These settings help you troubleshoot connection issues and manage unauthenticated and authenticated SSH sessions, especially in high-load environments.
21
21
22
22
## Symptoms
23
23
24
24
You can use `MaxStartups` and `MaxSessions` to address the following types of symptoms.
25
25
26
-
- Symptom 1: Clients can't connect to the OpenSSH Server service and establish sessions. Additionally, you might see errors such as the following messages:
26
+
- Symptom 1: Clients can't connect to the OpenSSH Server service and establish sessions. Additionally, you might receive the following error messages:
27
27
28
28
- Connection reset by peer
29
29
- Exceeded MaxStartups
@@ -33,28 +33,28 @@ You can use `MaxStartups` and `MaxSessions` to address the following types of sy
33
33
34
34
## Cause
35
35
36
-
Symptom 1 indicates that too many client applications are connecting to the OpenSSH Server service at once.
36
+
Symptom 1 indicates that too many client applications are connecting to the OpenSSH Server service at the same time.
37
37
38
-
Symptom 2 is limited to multiplexing environments, and indicates that the OpenSSH Server service can't support the number of sessions per connection that the clients are using. This symptom can occur after you configure`MaxStartups`.
38
+
Symptom 2 is limited to multiplexing environments. It indicates that the OpenSSH Server service can't support the number of sessions per connection that the clients are using. This symptom can occur after you configure`MaxStartups`.
39
39
40
40
## How to use the parameters
41
41
42
-
`MaxStartups`and `MaxSessions` are parameters in the sshd_config file, and function as follows.
42
+
`MaxStartups`and `MaxSessions` are parameters in the sshd_config file. The following sections explain how they function.
43
43
44
44
### MaxStartups
45
45
46
-
The `MaxStartups` parameter defines how many concurrent unauthenticated connections the OpenSSH Server service can manage. This setting is especially useful on servers that support multiple parallel SSH connections, such as jump hosts or provisioning servers (such as servers that use Ansible). It's also useful in high-load environments or during brute-force attacks.
46
+
The `MaxStartups` parameter defines how many concurrent unauthenticated connections the OpenSSH Server service can manage. This setting is especially useful on servers that support multiple parallel SSH connections, including jump hosts and provisioning servers (such as servers that use Ansible). It's also useful in high-load environments or during brute-force attacks.
47
47
48
-
The value is a set of three integers separated by colons, in the format `start:rate:full`. The integers represent the following values:
48
+
The value is a set of three integers that are separated by colons, in the format `Start:Rate:Full`. The integers represent the following values:
49
49
50
-
-**start**: The number of unauthenticated connections that the OpenSSH Server service supports before it starts dropping connections.
51
-
-**rate**: Probability that the OpenSSH Server service drops a connection. As long as the number of concurrent sessions is below the `start` value, the service ignores `rate`. However, when the number of concurrent connections surpasses `start`, each additional connection has a `rate`% probability of being dropped.
52
-
-**full**: When the number of concurrent connections surpasses `full`, the service drops all additional connections.
50
+
-**Start**: The number of unauthenticated connections that the OpenSSH Server service supports before it starts dropping connections.
51
+
-**Rate**: Probability that the OpenSSH Server service drops a connection. As long as the number of concurrent sessions is below the `Start` value, the service ignores `Rate`. However, when the number of concurrent connections surpasses `Start`, each additional connection has a `Rate` percent probability of being dropped.
52
+
-**Full**: When the number of concurrent connections surpasses `Full`, the service drops all additional connections.
53
53
54
-
For example, consider a system that's using the configuration `MaxStartups 20:40:60`. The OpenSSH Server service manages connections as follows:
54
+
For example, consider a system that's using the configuration,`MaxStartups 20:40:60`. The OpenSSH Server service manages connections as follows:
55
55
56
56
- The service maintains the first 20 concurrent unauthenticated connections.
57
-
- Starting with the 21st connection attempt, there's a 40% probability that the server drops the new connection attempt.
57
+
- Starting at the 21st connection attempt, there's a 40 percent probability that the server drops the new connection attempt.
58
58
- After the service reaches 60 concurrent unauthenticated connections, the server rejects all further connection attempts.
59
59
60
60
### MaxSessions
@@ -63,9 +63,9 @@ The `MaxSessions` parameter defines how many open shell, login, or subsystem (fo
63
63
64
64
### How to set the connection parameters
65
65
66
-
To modify these parameters for the Windows OpenSSH Server service, modify the sshd_config file and restart the OpenSSH Server service. To do this, follow these steps:
66
+
To modify the parameters for the Windows OpenSSH Server service, modify the sshd_config file, and then restart the OpenSSH Server service. To do this, follow these steps:
67
67
68
-
1. Using an Administrator-level account, open a text editor, and then open **%ProgramData%\ssh\sshd_config**. The default text these settings should resemble the following excerpt:
68
+
1. Using an Administrator-level account, open a text editor, and then open **%ProgramData%\ssh\sshd_config**. The default text for these settings should resemble the following excerpt:
69
69
70
70
```output
71
71
#MaxStartups 10
@@ -78,7 +78,7 @@ To modify these parameters for the Windows OpenSSH Server service, modify the ss
78
78
> [!NOTE]
79
79
> `MaxSessions` typically appears within the `# Authentication` section of the file. `MaxStartups` typically appears in a list of general options later in the file.
80
80
81
-
1. To enable `MaxStartup` or `MaxSessions` and set values, edit the text to resemble the following excerpt:
81
+
1. To enable `MaxStartup` or `MaxSessions` and to set values, edit the text to resemble the following excerpt:
82
82
83
83
```output
84
84
@@ -90,7 +90,7 @@ To modify these parameters for the Windows OpenSSH Server service, modify the ss
90
90
```
91
91
92
92
> [!NOTE]
93
-
> In this command, `20:40:60` and `15` are example values. Use values that're appropriate for your environment.
93
+
> In this command, `20:40:60` and `15` are example values. Use values that are appropriate for your environment.
94
94
95
95
1. Save and close the sshd_config file.
96
96
@@ -110,7 +110,7 @@ After the service restarts, it uses the new parameter values.
110
110
111
111
## More information
112
112
113
-
-[Windows configurations in sshd_config](/windows-server/administration/OpenSSH/openssh-server-configuration#windows-configurations-in-sshd_config) in "OpenSSH Server configuration for Windows Server and Windows"
113
+
-[Windows configurations in sshd_config](../windows-server/administration/OpenSSH/openssh-server-configuration#windows-configurations-in-sshd_config) in "OpenSSH Server configuration for Windows Server and Windows"
114
114
-[sshd_config(5) - Linux manual page](https://man7.org/linux/man-pages/man5/sshd_config.5.html)
0 commit comments