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

ssh: validate the ssh-key parameter if given #10293

Merged
merged 1 commit into from
Feb 11, 2021

Conversation

afbjorklund
Copy link
Collaborator

@afbjorklund afbjorklund commented Jan 28, 2021

Fixes the old (2016) TODO* from docker-machine, and might help to troubleshoot #10289

* https://github.com/docker/machine/blob/bd45ab13d88c32a3dd701485983354514abc41fa/drivers/generic/generic.go#L114

BEFORE:

🤦 StartHost failed, but will try again: creating host: create: creating: usermod: NewSession: new client: new client: Error creating new native config from ssh using: vagrant, &{[] [/home/anders/.minikube/machines/minikube/bogus]}: ssh: no key found

AFTER:

precreate: SSH key does not parse: "/tmp/bogus": ssh: no key found

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 28, 2021
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 28, 2021
@afbjorklund
Copy link
Collaborator Author

Here are the current errors, if something unexpected happens while reading the key file:

🤦  StartHost failed, but will try again: creating host: create: precreate: open /tmp/inaccessible: permission denied
😿  Failed to start ssh bare metal machine. Running "minikube delete" may fix it: creating host: create: precreate: open /tmp/inaccessible: permission denied

❌  Exiting due to GUEST_PROVISION: Failed to start host: creating host: create: precreate: open /tmp/inaccessible: permission denied

@medyagh medyagh merged commit ee6283e into kubernetes:master Feb 11, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund, medyagh

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:
  • OWNERS [afbjorklund,medyagh]

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants