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

Added ssh configurations to YANG model #13338

Merged

Conversation

ycoheNvidia
Copy link
Contributor

@ycoheNvidia ycoheNvidia commented Jan 11, 2023

Why I did it

Implemented ssh configurations

Work item tracking
  • Microsoft ADO (number only):

How I did it

Added ssh config table in configDB, once changed - hostcfgd will change the relevant OS files (sshd_config)

How to verify it

Tests in sonic-host-services. Change relevant configs in configDB such as ports, and see sshd port was modified

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

  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Added ssh config infrastructure

Link to config_db schema for YANG module changes

https://github.com/sonic-net/SONiC/blob/master/doc/ssh_config/ssh_config.md

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

A picture of a cute animal
image

.gitmodules Outdated Show resolved Hide resolved
@lguohan lguohan added the YANG YANG model related changes label Jan 11, 2023
@liat-grozovik liat-grozovik changed the title Sonic buildimage ssh config ssh config Feb 2, 2023
@ycoheNvidia
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

leaf ports {
description "ssh port numbers";
type string {
pattern '[0-9]+(,[0-9]+)*' {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any limit to the number of ports that can be defined?

Copy link
Contributor Author

@ycoheNvidia ycoheNvidia Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no limit that I am aware of (at least not in openSSH)

Copy link
Collaborator

@dgsudharsan dgsudharsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update doc/configuration.md

updated ports pattern to allow only port numbers in range 1 to 65536
@dgsudharsan
Copy link
Collaborator

Can you please update doc/configuration.md

@ycoheNvidia Please update the configuration schema

@liat-grozovik
Copy link
Collaborator

@ycoheNvidia please review recent comments and update following conflicts. once done please ping the reviewers for next step

@ycoheNvidia
Copy link
Contributor Author

Can you please update doc/configuration.md

Done @dgsudharsan @liat-grozovik

@dgsudharsan
Copy link
Collaborator

@ycoheNvidia Can you please check the configuration.md diff? It is showing the entire file as diff. We need to have only the sections related to the feature as diff

@ycoheNvidia
Copy link
Contributor Author

@ycoheNvidia Can you please check the configuration.md diff? It is showing the entire file as diff. We need to have only the sections related to the feature as diff

I took the latest file from master and added the relevant lines. It looks like a problem in Github. If you compare the texts manually you will be able to see changes are minimal

@ycoheNvidia ycoheNvidia changed the title ssh config Added ssh configurations to YANG model Jun 26, 2023
@ycoheNvidia
Copy link
Contributor Author

@ganglyu @qiluo-msft all comments addressed

qiluo-msft
qiluo-msft previously approved these changes Jun 27, 2023
@ganglyu
Copy link
Contributor

ganglyu commented Jun 27, 2023

@ganglyu @qiluo-msft all comments addressed

Please double check src/sonic-yang-models/yang-models/sonic-ssh-server.yang, I can still find tab in this file.

@ycoheNvidia
Copy link
Contributor Author

@ganglyu @qiluo-msft all comments addressed

Please double check src/sonic-yang-models/yang-models/sonic-ssh-server.yang, I can still find tab in this file.

fixed

@ycoheNvidia
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 13338 in repo sonic-net/sonic-buildimage

@ycoheNvidia
Copy link
Contributor Author

@ganglyu @qiluo-msft need your approval - had to rebase in order to resolve CI issue (no merge issues)

@liat-grozovik liat-grozovik merged commit 7639df0 into sonic-net:master Jul 10, 2023
18 checks passed
sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this pull request Sep 20, 2023
- Why I did it
Implemented ssh configurations

- How I did it
Added ssh config table in configDB, once changed - hostcfgd will change the relevant OS files (sshd_config)

- How to verify it
Tests in sonic-host-services. Change relevant configs in configDB such as ports, and see sshd port was modified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
YANG YANG model related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants