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

[openssh] Introduce custom openssh-server package for supporting reverse console SSH #5717

Merged
merged 10 commits into from
Nov 2, 2020

Conversation

Blueve
Copy link
Contributor

@Blueve Blueve commented Oct 26, 2020

- Why I did it

To support reverse SSH feature, we need to build a custom openssh-server package and replace the official one in SONiC OS.

(see HLD for more detail: https://github.com/Azure/SONiC/blob/master/doc/console/SONiC-Console-Switch-High-Level-Design.md#313-reverse-ssh)

- How I did it

  • Modify source code of openssh-server to allow the sshd expose the style field in $SSH_TARGET_CONSOLE_LINE.
  • Build custom openssh-server
  • Install custom openssh-server

- How to verify it

  • Build custom openssh-server package and install/test it on a physical SONiC switch
  • Build an image which includes the change of current PR and install/test it on a physical DUT

Test Steps:

  1. Login with below options
    image

  2. Run below command and check the result

admin@sonic:~$ echo $SSH_TARGET_CONSOLE_LINE
1

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

  • 201811
  • 201911
  • 202006

- Description for the changelog

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

Copy link
Collaborator

@lguohan lguohan left a comment

Choose a reason for hiding this comment

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

the patch contains lots of unrelated changes. please simplify.

@lguohan
Copy link
Collaborator

lguohan commented Oct 26, 2020

i am not able to review the patch till you have simplfied the patch.

@Blueve
Copy link
Contributor Author

Blueve commented Oct 26, 2020

Seems like the openssh-server package were not been built with image.

dpkg: error: cannot access archive 'target/debs/buster/openssh-server_*.deb': No such file or directory

Investigating...

But run below command works.

target/debs/buster/openssh-server_7.9p1-10+deb10u2_amd64.deb

@Blueve
Copy link
Contributor Author

Blueve commented Oct 26, 2020

retest this please

@Blueve Blueve marked this pull request as ready for review October 27, 2020 08:29
@Blueve Blueve requested review from lguohan and yxieca October 27, 2020 08:29
@Blueve
Copy link
Contributor Author

Blueve commented Oct 28, 2020

retest this please

@lguohan
Copy link
Collaborator

lguohan commented Oct 28, 2020

@qiluo-msft, please take a look at this openssh change.

lguohan
lguohan previously approved these changes Oct 28, 2020
Copy link
Collaborator

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

As comments

yxieca
yxieca previously approved these changes Oct 29, 2020
src/openssh/Makefile Outdated Show resolved Hide resolved
Copy link
Collaborator

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

As comment

@Blueve
Copy link
Contributor Author

Blueve commented Oct 31, 2020

retest vsimage please

3 similar comments
@Blueve
Copy link
Contributor Author

Blueve commented Oct 31, 2020

retest vsimage please

@Blueve
Copy link
Contributor Author

Blueve commented Nov 1, 2020

retest vsimage please

@Blueve
Copy link
Contributor Author

Blueve commented Nov 1, 2020

retest vsimage please

@Blueve Blueve merged commit 698b554 into sonic-net:master Nov 2, 2020
@Blueve Blueve deleted the dev/jika/openssh branch November 2, 2020 02:31
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
…rse console SSH (sonic-net#5717)

* Build and install openssh from source
* Copy openssh deb package to dest folder
* Update make rule
* Update sonic debian extension
* Append empty line before EOF
* Update openssh patch
* Add openssh-server to base image dependency
* Fix indent type
* Fix comments
* Use commit id instead of tag id and add comment

Signed-off-by: Jing Kan jika@microsoft.com
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.

4 participants