Improve SSHD config to use more secure settings#12109
Merged
liuh-80 merged 1 commit intosonic-net:masterfrom Sep 22, 2022
Merged
Improve SSHD config to use more secure settings#12109liuh-80 merged 1 commit intosonic-net:masterfrom
liuh-80 merged 1 commit intosonic-net:masterfrom
Conversation
Contributor
Author
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
saiarcot895
approved these changes
Sep 21, 2022
6 tasks
yejianquan
pushed a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Nov 14, 2022
* Reset sshd timeout Approach What is the motivation for this PR? In pr [sonic-net/sonic-buildimage#12109], it decrease the sshd timout from 15mins to 5mins. It may cause timeout when executing generate_dump -s yesterday in posttest. So in this pr, during deploying minigraph, we reset this time. How did you do it? Modify the value /etc/ssh/sshd_config/ClientAliveInterval in deploy minigraph. co-authorized by: [email protected]
yejianquan
pushed a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Nov 14, 2022
* Reset sshd timeout Approach What is the motivation for this PR? In pr [sonic-net/sonic-buildimage#12109], it decrease the sshd timout from 15mins to 5mins. It may cause timeout when executing generate_dump -s yesterday in posttest. So in this pr, during deploying minigraph, we reset this time. How did you do it? Modify the value /etc/ssh/sshd_config/ClientAliveInterval in deploy minigraph. co-authorized by: [email protected]
yejianquan
pushed a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Nov 14, 2022
* Reset sshd timeout Approach What is the motivation for this PR? In pr [sonic-net/sonic-buildimage#12109], it decrease the sshd timout from 15mins to 5mins. It may cause timeout when executing generate_dump -s yesterday in posttest. So in this pr, during deploying minigraph, we reset this time. How did you do it? Modify the value /etc/ssh/sshd_config/ClientAliveInterval in deploy minigraph. co-authorized by: [email protected]
This was referenced Nov 16, 2022
yutongzhang-microsoft
added a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Nov 17, 2022
Description of PR In pr [sonic-net/sonic-buildimage#12109], it decrease the sshd timout from 15mins to 5mins. It may cause timeout when executing reduce_and_add_sonic_images in upgrade_sonic.yml. So in this pr, we reset this time before executing reduce_and_add_sonic_images. What is the motivation for this PR? In pr [sonic-net/sonic-buildimage#12109], it decrease the sshd timout from 15mins to 5mins. It may cause timeout when executing reduce_and_add_sonic_images in upgrade_sonic.yml. So in this pr, we reset this time before executing reduce_and_add_sonic_images. How did you do it? Modify the value /etc/ssh/sshd_config/ClientAliveInterval in upgrade_sonic.yml. Signed-off-by: Yutong Zhang <[email protected]>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve SSHD config to use more secure settings
Why I did it
According to Sonic OS review result, SSHD config file /etc/ssh/sshd_config using insecure settings.
How I did it
Change build_debian.sh script to set following settings to /etc/ssh/sshd_config:
ClientAliveInterval is set to 300
MaxAuthTries is set to default of 3
Banner set to /etc/issue
LogLevel is set to VERBOSE
How to verify it
Pass all E2E test case.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Improve SSHD config to use more secure settings
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)