有可能有多个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
  • 阅读 ( 151 )
  • 分类:互联网

你可能感兴趣的文章

你的树莓皮有问题吗?试试这4个补丁

... 但是,这并不理想。此外,您可能有从原始microSD卡中需要的数据。为了检索此数据,请将microSD卡**计算机的读卡器。浏览到/home/folder,然后将其复制到PC的硬盘驱动器。 ...

  • 发布于 2021-03-11 15:11
  • 阅读 ( 272 )

你的树莓皮安全吗?

...的过程中,您的Raspberry Pi随时在线,那么您需要了解这些可能性。 ...

  • 发布于 2021-03-13 03:37
  • 阅读 ( 226 )

ssh和vpn的区别是什么?哪个更安全?

...以在远程工作时访问公司的局域网或广域网。你基本上在同一个网络上,即使你在不同的物理位置。你的流量是加密的,保护你的活动免受窥视。 ...

  • 发布于 2021-03-14 04:40
  • 阅读 ( 416 )

如何在任何raspberry pi上安装vpn

... 对于Kodi media center,VPN可能会绕过区域阻止、审查或任何其他阻止您访问媒体的措施。 ...

  • 发布于 2021-03-14 18:08
  • 阅读 ( 308 )

如何直接连接到树莓皮没有互联网

... 例如,如果你正在使用你的Pi和相机模块,你可能喜欢把它带到外面,也许是为了捕捉一些延时摄影。如果没有通过SSH连接到Pi的无线网络,您将需要另一个解决方案,它可以通过PC或移动设备工作。 ...

  • 发布于 2021-03-16 08:17
  • 阅读 ( 218 )

通过引导分区破解树莓pi的6种方法

...选,50美元的电脑会让你忙上几个月。但是建立树莓皮皮可能会很费时。 ...

  • 发布于 2021-03-18 17:12
  • 阅读 ( 239 )

windows10ssh与putty:是时候切换远程访问客户端了?

... 不过,多亏了Windows PowerShell,您可能不再需要腻子了。让我们看看如何在windows10中设置SSH访问,以及新工具是否可以取代PuTTY。 ...

  • 发布于 2021-03-22 22:29
  • 阅读 ( 323 )

如何使用安卓平板电脑作为树莓皮显示器

... 重要提示:你需要确保你的Raspberry Pi和Android平板电脑在同一个网络上。另外,如果你使用Android设备作为无线接入点,这也行不通。 ...

  • 发布于 2021-03-30 19:23
  • 阅读 ( 418 )

如何使用cockpit web界面管理linux服务器

...如果其中一些是运行无头系统没有显示器连接。例如,您可能有机架安装或远程服务器位于不同的建筑物或收集树莓皮分散在您的家中。 如何监控所有这些设备的运行状况和性能? 如果使用secureshell(SSH)连接到它们,那么可...

  • 发布于 2021-04-01 00:16
  • 阅读 ( 298 )

如何在raspberry pi上设置双因素身份验证

...须正确。 配置pi 如果您通常使用SSH连接到Pi上,那么它很可能是一个无头系统,因此我们将通过SSH连接配置它。 建立两个SSH连接最安全:一个用于配置和测试,另一个用作安全网。这样,如果将自己锁定在Pi之外,第二个活动SSH...

  • 发布于 2021-04-02 02:18
  • 阅读 ( 172 )
302066
302066

0 篇文章

相关推荐