Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user's login session limit #132

Open
chengjianwen opened this issue Jun 18, 2021 · 1 comment
Open

user's login session limit #132

chengjianwen opened this issue Jun 18, 2021 · 1 comment

Comments

@chengjianwen
Copy link

How can I limit the user login session?
I means one user can login on multi host at same time. I don't want that.
Thanks

@maxnet
Copy link
Collaborator

maxnet commented Jun 30, 2021

That is not really a supported feature.

At the authentication stage it can only check if username/password is correct, and does not know anything about if user is already logged in somewhere or not.
You do may be able to deny the user access to his home directory if logged in more than once (through pam_limits and maxlogins in /etc/security/limits.conf on the server), but that may lock out your user as well if network connectivity is ever interrupted, and the system thinks the user is already logged in, while the previous connection is no longer usable.
Would not recommend it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants