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

Add j2 template for enable pam_limit and limit SSH session #10298

Merged
merged 5 commits into from
Mar 23, 2022

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Mar 21, 2022

Why I did it

When too many user login concurrently and run commands, SONiC may kernel panic on some device which has very limited memory.

How I did it

Add j2 template for setup pam_limit plugin for limit SSH session per-user.

How to verify it

Manually validate the j2 template can generate correct config file.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Add j2 template for setup pam_limit plugin for limit SSH session per-user.

A picture of a cute animal (not mandatory but encouraged)

@liuh-80 liuh-80 requested review from qiluo-msft and yxieca March 21, 2022 08:16
@qiluo-msft
Copy link
Collaborator

I will check after merging #10177

@liuh-80
Copy link
Contributor Author

liuh-80 commented Mar 23, 2022

The behavior been tested by following steps:

  1. Update the config template to match device HWSKU and device type to limit SSH session to 4.
  2. When user try to make more than 4 ssh connection, the connection will be reject and user will get a alert message.

@liuh-80 liuh-80 merged commit bb65791 into sonic-net:201811 Mar 23, 2022
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

Successfully merging this pull request may close these issues.

3 participants