有可能有多個ssh連線到同一個系統嗎?

當您第一次設定個人伺服器時,您可能會發現自己有很多關於它是什麼或不能做什麼的問題。有鑑於此,今天的超級使用者問答帖子為一位好奇的讀者提供了答案。...

有可能有多個ssh連線到同一個系統嗎?

當您第一次設定個人伺服器時,您可能會發現自己有很多關於它是什麼或不能做什麼的問題。有鑑於此,今天的超級使用者問答帖子為一位好奇的讀者提供了答案。

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。

卡薩布蘭卡提供的截圖(維基百科共享)。

問題

超級使用者讀者Sam3000想知道是否可能有多個SSH連線到同一個系統:

I have a Linux computer acting as a server that can accept incoming SSH connecti***. Is it possible to reliably connect multiple devices at the same time, such as my mobile phone and laptop, as well as other desktops, to the same server using SSH?

有可能有多個SSH連線到同一個系統嗎?

答案

超級使用者badge be和Hastur為我們提供了答案。首先,徽章是:

The Short Answer

Yes, it usually works by default.

The Long Answer

It depends on what you are using it for. It may slow down with multiple connecti***, but that is a bandwidth issue, not an SSH issue.

接著是哈斯特的回答:

Yes it is possible, it is the default behavior. You can rely on it if you are using an updated version of SSH and it is no longer set to Protocol 1. The command below should give you Protocol 2.

  • grep “Protocol” /etc/ssh/sshd_config

Limits for the Connecti***

You can look upon SSH as an encrypted evolution of telnet, born to allow remote access to a server. Note that SSH connects over TCP and it is able to forward X-sessi*** (graphical sessi***) too. Multi-tasking and multiple users are a part of the inner nature of Unix (even if it is not without limits).

You can see some of those limits in the TCP and SSH limits:

  • cat /proc/sys/net/core/somaxconn (usually 128, to see the maximum number of TCP outstanding connecti*** you can have)

The kern.ipc.somaxconn sysctl(8) variable limits the size of the listening queue for accepting new TCP connecti***. The default value of 128 is typically too low for robust handling of new connecti*** on a heavily loaded web server.

  • cat /proc/sys/net/core/netdev_max_backlog (usually 1000, the maximum length of the TCP packet queue)
  • less /etc/security/limits.conf (you can find the limits for the number of users)
  • MaxSessi*** in /etc/ssh/sshd_config (specifies the maximum number of open sessi*** permitted per network connection, the default is set at 10)
  • #MaxStartups 10:30:60, usually commented in the /etc/ssh/sshd_config (specifies the maximum number of concurrent unauthenticated connecti*** to the SSH daemon, the default is set at 10)

References

1. man ssh and man sshd on your computer

2. The man pages for sshd and sshd_config


有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。

  • 發表於 2021-04-10 00:26
  • 閱讀 ( 33 )
  • 分類:網際網路

你可能感興趣的文章

livecd的50個酷用法

...工具箱中最有用的工具,但是livecd能幫你做多少呢?livecd可能是所有geek工具箱中最有用的工具。本live CD操作指南概述了live CD或DVD可提供的許多用途,從資料恢復到增強隱私。 ...

  • 發佈於 2021-03-12 09:39
  • 閲讀 ( 53 )

這些是最難安裝的linux作業系統嗎?

...馳。他們通常以易用性換取靈活性和開箱即用的功能。這可能不是對每個人都有好處,但對那些喜歡它的人來說可能非常非常有吸引力。 ...

  • 發佈於 2021-03-13 01:34
  • 閲讀 ( 46 )

你的樹莓皮安全嗎?

...的過程中,您的Raspberry Pi隨時線上,那麼您需要了解這些可能性。 ...

  • 發佈於 2021-03-13 03:37
  • 閲讀 ( 62 )

樹莓皮:非官方教程

... 你可能知道Pi不是唯一的小型計算機專案。在過去的幾年裡,一些精裝、低成本的電腦已經為愛好者們釋出,在某種程度上與上世紀70年代和80年代的黃金自制時代相呼應。 ...

  • 發佈於 2021-03-13 15:59
  • 閲讀 ( 65 )

ssh和vpn的區別是什麼?哪個更安全?

...。SSH和VPN都為我們提供了一個額外的安全和隱私層——這可能是您選擇將它們融入數字生活的全部原因。 ...

  • 發佈於 2021-03-14 04:40
  • 閲讀 ( 66 )

如何用ssh遠端管理linux伺服器

...thinkserverts140。根據您的硬體和Linux發行版,SSH的準備工作可能略有不同。 ...

  • 發佈於 2021-03-15 17:05
  • 閲讀 ( 55 )

如何直接連線到樹莓皮沒有網際網路

... 例如,如果你正在使用你的Pi和相機模組,你可能喜歡把它帶到外面,也許是為了捕捉一些延時攝影。如果沒有透過SSH連線到Pi的無線網路,您將需要另一個解決方案,它可以透過PC或移動裝置工作。 ...

  • 發佈於 2021-03-16 08:17
  • 閲讀 ( 54 )

透過引導分割槽破解樹莓pi的6種方法

...選,50美元的電腦會讓你忙上幾個月。但是建立樹莓皮皮可能會很費時。 ...

  • 發佈於 2021-03-18 17:12
  • 閲讀 ( 48 )

6款出色的android網路應用程式,用於監控、ping等

... 你的Android**或平板電腦可能大部分時間都線上。但是什麼樣的應用程式和服務正在連線到網際網路,它們正在下載(或上傳)什麼資料,這些資料將流向哪裡? ...

  • 發佈於 2021-03-22 17:15
  • 閲讀 ( 55 )

開始使用kali linux和raspberry pi進行道德駭客攻擊

... 引導過程不應該花費太長時間,但是螢幕可能會閃爍,有時會變成空白。預設登入使用者名稱為root,密碼為toor。 ...

  • 發佈於 2021-03-24 05:10
  • 閲讀 ( 54 )
302066
302066

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章