If you want to add (or restrict) users logging on to the service through ssh or telnet, you can modify the kernel parameters to limit the number of users. the following example demonstrates vim/etc/sysctl. added kernel in conf. pty. max = 3 // The pseudo terminal is limited to three execute sysctl-p to log on to the remote system through ssh again. when 4th connections are opened, a prompt is displayed, which achieves our purpose.
If you want to add (or restrict) users logging on to the service through ssh or telnet, you can modify the kernel parameters to limit the number of users. the following example shows how to restrict the number of users.
In vim/etc/sysctl. conf, add kernel. pty. max = 3 // restrict the pseudo terminal to three execute sysctl-p
Log on to the remote system through ssh again. when 4th connections are enabled, a message is displayed.