job.answiz.com
  • 7
Votes
name

I have a linux computer acting as a server which can accept incoming SSH connections.

Is it possible to reliably connect multiple devices at the same time, such as my phone and laptop, as well as other desktops, to the same server using SSH?

Thanks for the help.

Yes, it totally is. But this should be implementation-defined. You could as well program your own (probably not so secure, and worse) ssh server that cannot handle multiple connections. But just like common HTTP-Servers of course support this, openssh does so too.

Actually this is the very concept of Unix: A multiuser system where a server does all the work and only small clients connect (terminals).

  • 0
Reply Report

Yes it is possible, it is the default behaviour.

Trust

You can rely if you are using an updated version of ssh and the protocol is not any more 1.

grep "Protocol"  /etc/ssh/sshd_config

The command above should give you Protocol 2.

Limits for the connections

You can see ssh as the encrypted evolution of telnet, born in the far '69 to allow remote access to a server. Note that ssh connects over TCP and it is able to forward X-sessions (graphical session) too. Multitasking and multi-user are in 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 TCP outstanding connection you can have;

    The kern.ipc.somaxconn sysctl(8) variable limits the size of the listen 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 user.
  • MaxSessions in /etc/ssh/sshd_config

    MaxSessions Specifies the maximum number of open sessions permitted per network connection. The default is 10.

  • #MaxStartups 10:30:60 usually commented in the /etc/ssh/sshd_config and by default set to 10

    Specifies the maximum number of concurrent unauthenticated connections to the SSH daemon... The default is 10.

  • 0
Reply Report

The short answer - Yes. It usually works by default.

The long answer - Depending on what you are using it for, it may slow down with multiple connections, but that is a bandwidth issue, not an ssh issue.

  • 0
Reply Report