Có thể có nhiều kết nối SSH với cùng một hệ thống không?

Mục lục:

Có thể có nhiều kết nối SSH với cùng một hệ thống không?
Có thể có nhiều kết nối SSH với cùng một hệ thống không?

Video: Có thể có nhiều kết nối SSH với cùng một hệ thống không?

Video: Có thể có nhiều kết nối SSH với cùng một hệ thống không?
Video: #Tips : bẻ khóa, password Android dễ dàng | iMobie Droidkit - YouTube 2024, Tháng tư
Anonim
Khi bạn thiết lập máy chủ cá nhân lần đầu tiên, bạn có thể thấy mình có khá nhiều câu hỏi về nó là gì hoặc không có khả năng làm. Với ý nghĩ đó, bài đăng Hỏi & Đáp của SuperUser hôm nay có câu trả lời cho câu hỏi của người đọc tò mò.
Khi bạn thiết lập máy chủ cá nhân lần đầu tiên, bạn có thể thấy mình có khá nhiều câu hỏi về nó là gì hoặc không có khả năng làm. Với ý nghĩ đó, bài đăng Hỏi & Đáp của SuperUser hôm nay có câu trả lời cho câu hỏi của người đọc tò mò.

Phiên Hỏi & Đáp hôm nay đến với chúng tôi theo lịch sự của SuperUser - một phân khu của Stack Exchange, một nhóm các trang web Hỏi & Đáp do cộng đồng điều hành.

Ảnh chụp màn hình lịch sự của Casablanca (Wikimedia Commons).

Câu hỏi

Trình đọc siêu người dùng Sam3000 muốn biết liệu có thể có nhiều kết nối SSH đến cùng một hệ thống hay không:

I have a Linux computer acting as a server that can accept incoming SSH connections. 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?

Có thể có nhiều kết nối SSH đến cùng một hệ thống không?

Câu trả lời

Người đóng góp SuperUser huy hiệu và Hastur có câu trả lời cho chúng tôi. Đầu tiên, huy hiệu:

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 connections, but that is a bandwidth issue, not an SSH issue.

Tiếp theo là câu trả lời từ Hastur:

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 Connections

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-sessions (graphical sessions) 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 connections you can have)

The kern.ipc.somaxconn sysctl(8) variable limits the size of the listening queue for accepting new TCP connections. The default value of 128 is typically too low for robust handling of new connections 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)
  • MaxSessions in /etc/ssh/sshd_config (specifies the maximum number of open sessions 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 connections 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

Có cái gì để thêm vào lời giải thích? Tắt âm thanh trong các ý kiến. Bạn muốn đọc thêm câu trả lời từ những người dùng Stack Exchange có hiểu biết công nghệ khác? Xem toàn bộ chuỗi thảo luận tại đây.

Đề xuất: