How many users does Linux support being logged in at the same time via SSH?
When logging in using SSH, you use a pseudo-terminal (a pty) allocated to the SSH daemon, not a real one (a tty). Pseudo-terminals are created and destroyed as needed. You can find the number of ptys allowed to be allocated at one time at /proc/sys/kernel/pty/max
, and this value can be modified using the kernel.pty.max
sysctl variable. Assuming that no other ptys are in use, that would be your limit.
w
, who
, and users
are the canonical tools for accessing information about logged in users. last
and lastlog
also contain historical data.