Multiple SSH connections to the same system - is it possible?
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.
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 10Specifies the maximum number of concurrent unauthenticated connections to the SSH daemon... The default is 10.
References
-
man ssh
,man sshd
on your machine. - The man page of sshd or of sshd_config.
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).
Yes, this is very common. Indeed if used as a fileserver and by many users it is absolutely essential. SFTP uses SSH, and there is a lot of EDI activity that depends on it too.
From devices it is possible to trigger events with custom user logons (such as poweroff or reboot).
Consider also SCP (WinSCP is commonly used to access source code), and KDE users still able to use fish: in Konqueror.
Notable too is the use of additional ports in case of loss during maintenance (Ubuntu do-release-upgrade, say).
So yes, I gather you have never had multiple PuTTY terminals open ?