-
Notifications
You must be signed in to change notification settings - Fork 759
pkg/hostagent: Use in-process SSH client on executing requirement scripts #4333
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
Draft
norio-nomura
wants to merge
7
commits into
lima-vm:master
Choose a base branch
from
norio-nomura:use-in-process-ssh-client-to-requirement
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
pkg/hostagent: Use in-process SSH client on executing requirement scripts #4333
norio-nomura
wants to merge
7
commits into
lima-vm:master
from
norio-nomura:use-in-process-ssh-client-to-requirement
Conversation
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
Contributor
Author
|
This change aims to avoid error: |
6f82138 to
bfad23e
Compare
7ac972c to
19da4f8
Compare
75df537 to
11f5967
Compare
Contributor
Author
This error no longer occurs, but instead ssh connection is no longer possible in macOS+QEMU. 😞 |
776ff21 to
9e82e1a
Compare
56cf488 to
5f12c0b
Compare
Check the SSH server in a way that complies with the SSH protocol using x/crypto/ssh. This change fixes lima-vm#4334 by falling back to usernet port forwarder on failing SSH connections over VSOCK. - pkg/networks/usernet: Rename entry point from `/extension/wait_port` to `/extension/wait_ssh_server` Because it changed to an SSH server-specific entry point. When a client accesses the old entry point, it fails and continues with falling back to the usernet forwarder. - pkg/sshutil: Add `WaitSSHReady()` WaitSSHReady waits until the SSH server is ready to accept connections. The dialContext function is used to create a connection to the SSH server. The addr, user, privateKeyPath parameter is used for ssh.ClientConn creation. The timeoutSeconds parameter specifies the maximum number of seconds to wait. Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
f82a400 to
8f0d92e
Compare
Contributor
Author
Contributor
Author
This change changes the SSH server keys that have been generated for each boot in guest OS to be generated by hostagent for each boot. This allows the hostagent to obtain the public key before booting, so that knownhosts can be used with an ssh connection. The code that uses `ssh.InsecureIgnoreHostKey()` in `x/crypto/ssh` is pointed out in CodeQL as `Use of insecure HostKeyCallback implementation (High)`, so it is an implementation to avoid this. Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
…ipts Use an in-process SSH client on executing requirement scripts other than starting an SSH ControlMaster process. To fall back to external SSH, add the `LIMA_EXTERNAL_SSH_REQUIREMENT` environment variable. - pkg/sshutil: Add `ExecuteScriptViaInProcessClient()` Signed-off-by: Norio Nomura <norio.nomura@gmail.com> # Conflicts: # pkg/sshutil/sshutil.go # Conflicts: # pkg/sshutil/sshutil.go
Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
QEMU 10.1.2 seems to break on GitHub runners Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
…cmdline `template:` refers to installed templates. So, it needs to be injected before executing `make install`. Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
…ForSSH()`" This reverts commit 5fde2e3.
8f0d92e to
ad1aad8
Compare
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.
Use an in-process SSH client on executing requirement scripts other than starting an SSH ControlMaster process. To fall back to external SSH, add the
LIMA_EXTERNAL_SSH_REQUIREMENTenvironment variable.ExecuteScriptViaInProcessClient()