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

feat: Support cli argument for host key #992

Merged
merged 3 commits into from
Oct 9, 2022
Merged

Conversation

gaocegege
Copy link
Member

@gaocegege gaocegege commented Oct 9, 2022

If you don't specify a host key, it will generate one every time. This is convenient except you'll have to deal with clients being confused that the host key is different. It's a better idea to generate or point to an existing key on your system:

https://pkg.go.dev/github.com/gliderlabs/ssh@v0.3.5

The host key in envd-sshd is generated every time. Thus the fingerprint of the sshd always changes. This PR is to add a cli argument to support custom host key.

Ref #101

Signed-off-by: Ce Gao cegao@tensorchord.ai

Signed-off-by: Ce Gao <cegao@tensorchord.ai>
Signed-off-by: Ce Gao <cegao@tensorchord.ai>
Copy link
Member

@VoVAllen VoVAllen left a comment

Choose a reason for hiding this comment

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

What's host key? Is it public key? Or is it flagAuthKey?

pkg/ssh/ssh.go Outdated
// create agent and add in auth
forwardingAgent := agent.NewClient(agentConn)
// add callback for forwarding agent to SSH config
// XXX - might want to handle reconnects appending multiple callbacks
Copy link
Member

Choose a reason for hiding this comment

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

What's XXX?

@gaocegege
Copy link
Member Author

Signed-off-by: Ce Gao <cegao@tensorchord.ai>
Copy link
Member

@VoVAllen VoVAllen left a comment

Choose a reason for hiding this comment

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

LGTM.

@muniu-bot
Copy link

muniu-bot bot commented Oct 9, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gaocegege, VoVAllen

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@VoVAllen
Copy link
Member

VoVAllen commented Oct 9, 2022

/lgtm

@muniu-bot muniu-bot bot added the lgtm label Oct 9, 2022
@muniu-bot muniu-bot bot merged commit b2a9018 into tensorchord:main Oct 9, 2022
@gaocegege gaocegege deleted the ssh branch October 9, 2022 13:00
enjoyliu pushed a commit to enjoyliu/envd that referenced this pull request Oct 12, 2022
* feat: Support cli argument for host key

Signed-off-by: Ce Gao <cegao@tensorchord.ai>

* fix: Update

Signed-off-by: Ce Gao <cegao@tensorchord.ai>

* fix: Remove comments

Signed-off-by: Ce Gao <cegao@tensorchord.ai>

Signed-off-by: Ce Gao <cegao@tensorchord.ai>
Signed-off-by: luisyjliu <luisyjliu@tencent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants