Giter Site home page Giter Site logo

Make ssh keys configurable about lima HOT 6 CLOSED

lima-vm avatar lima-vm commented on September 3, 2024
Make ssh keys configurable

from lima.

Comments (6)

AkihiroSuda avatar AkihiroSuda commented on September 3, 2024

I've choosen $LIMA_HOME/_config because there seemed to be tentative agreement already in #63 on using $LIMA_HOME/_cache for the cache.

What about using instance directories ($LIMA_HOME/<INSTANCE>)?

from lima.

jandubois avatar jandubois commented on September 3, 2024

What about using instance directories ($LIMA_HOME/<INSTANCE>)?

I don't really see a reason to use (and generate) a different identity to connect to the different instances.

But there is also a logic-flow issue: the instance directory is create by lima in response to limactl start, so there is no way to insert an authorized host entry there before the VM is spun up.

I guess you could add an entry into the limayaml file for authorized keys. I don't care much either way, but I think eventually lima will have other data to store in a _config directory anyways (e.g. preference settings), so putting a shared identity in there made sense to me.

from lima.

AkihiroSuda avatar AkihiroSuda commented on September 3, 2024

SGTM

from lima.

jandubois avatar jandubois commented on September 3, 2024

After further consideration I think we should always use an internal identity and never rely on the user's ~/.ssh.

Hypothetical situation: the user has a single key, and that get's replaced for whatever reason (key compromise, company policy to stronger keys, whatever). If the user replaces the key and doesn't have a backup, they lose all access to all running lima instances and will have to recreate them from scratch. It will also be difficult to understand why limactl shell suddenly stops working.

Not ever using ~/.ssh/*.pub also simplifies the code, reducing the chance for bugs.

@AkihiroSuda Is there any reason not to update #83 to make this change?

from lima.

AkihiroSuda avatar AkihiroSuda commented on September 3, 2024

After further consideration I think we should always use an internal identity

SGTM 👍

and never rely on the user's ~/.ssh.

I would prefer to use both internal identity and ~/.ssh by default so that the user can use other ssh-based programs such as rsync and sshfs with Lima without googling around how to specify the internal identity.

We can have a YAML field like ssh.loadDotSSHPubKeys: false to optionally disable ~/.ssh if there is a concern.

from lima.

jandubois avatar jandubois commented on September 3, 2024

| We can have a YAML field like ssh.loadDotSSHPubKeys: false to optionally disable ~/.ssh if there is a concern.

I don't see a reason why that would be needed. Adding the ~/.ssh/*.pub keys should be fine, as long as there is always also an independent lima identity included, so the instances remain accessible, regardless of what happens to the user-managed keys.

from lima.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.