1
我想限制ssh連接的總數。我經歷了許多sshd手冊。他們只是說可以使用這兩個字段 MaxStartups:與SSH守護進程併發的未經身份驗證的連接的最大數量 MaxSession:每個TCP連接允許的(多路複用)打開會話的最大數量。 兩者在計算ssh連接總數方面的貢獻是什麼?sshd_config中maxstartups和maxsessions之間的區別
我想限制ssh連接的總數。我經歷了許多sshd手冊。他們只是說可以使用這兩個字段 MaxStartups:與SSH守護進程併發的未經身份驗證的連接的最大數量 MaxSession:每個TCP連接允許的(多路複用)打開會話的最大數量。 兩者在計算ssh連接總數方面的貢獻是什麼?sshd_config中maxstartups和maxsessions之間的區別
MaxSessions
Specifies the maximum number of open shell, login or subsystem
(e.g. sftp) sessions permitted per network connection. Multiple
sessions may be established by clients that support connection
multiplexing. Setting MaxSessions to 1 will effectively disable
session multiplexing, whereas setting it to 0 will prevent all
shell, login and subsystem sessions while still permitting for-
warding. The default is 10.
MaxStartups
Specifies the maximum number of **concurrent unauthenticated con-
nections to the SSH daemon.** Additional connections will be
dropped until authentication succeeds or the LoginGraceTime
expires for a connection. The default is 10:30:100.
Alternatively, random early drop can be enabled by specifying the
three colon separated values ``start:rate:full'' (e.g.
"10:30:60"). sshd(8) will refuse connection attempts with a
probability of ``rate/100'' (30%) if there are currently
``start'' (10) unauthenticated connections. The probability
increases linearly and all connection attempts are refused if the
number of unauthenticated connections reaches ``full'' (60).
感謝您的輸入,但Gaurav已經表示他看過了sshd手冊(這是您從中複製它的地方)。 – LokMac
我也想知道這一點。我從同事那裏得到的最好解釋是MaxSessions涉及單個SSH登錄的併發多路複用網絡連接數量,他認爲MaxStartup可能與無密碼SSH連接有關,但我自己無法證實這一點(即我試圖找出什麼是真正認爲「未經證實」)。有人知道嗎? – LokMac