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

Disable ssh.loadDotSSHPubKeys by default #2706

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ ssh:
# This option is useful when you want to use other SSH-based
# applications such as rsync with the Lima instance.
# If you have an insecure key under ~/.ssh, do not use this option.
# 🟢 Builtin default: true
# 🟢 Builtin default: false (since Lima v1.0)
loadDotSSHPubKeys: null
# Forward ssh agent into the instance.
# The ssh agent socket can be mounted in a container at the path `/run/host-services/ssh-auth.sock`.
Expand Down
2 changes: 1 addition & 1 deletion pkg/limayaml/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func FillDefault(y, d, o *LimaYAML, filePath string) {
y.SSH.LoadDotSSHPubKeys = o.SSH.LoadDotSSHPubKeys
}
if y.SSH.LoadDotSSHPubKeys == nil {
y.SSH.LoadDotSSHPubKeys = ptr.Of(true)
y.SSH.LoadDotSSHPubKeys = ptr.Of(false) // was true before Lima v1.0
}

if y.SSH.ForwardAgent == nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/limayaml/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestFillDefault(t *testing.T) {
},
SSH: SSH{
LocalPort: ptr.Of(0),
LoadDotSSHPubKeys: ptr.Of(true),
LoadDotSSHPubKeys: ptr.Of(false),
ForwardAgent: ptr.Of(false),
ForwardX11: ptr.Of(false),
ForwardX11Trusted: ptr.Of(false),
Expand Down
2 changes: 1 addition & 1 deletion pkg/limayaml/limayaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ type SSH struct {
LocalPort *int `yaml:"localPort,omitempty" json:"localPort,omitempty"`

// LoadDotSSHPubKeys loads ~/.ssh/*.pub in addition to $LIMA_HOME/_config/user.pub .
LoadDotSSHPubKeys *bool `yaml:"loadDotSSHPubKeys,omitempty" json:"loadDotSSHPubKeys,omitempty"` // default: true
LoadDotSSHPubKeys *bool `yaml:"loadDotSSHPubKeys,omitempty" json:"loadDotSSHPubKeys,omitempty"` // default: false
ForwardAgent *bool `yaml:"forwardAgent,omitempty" json:"forwardAgent,omitempty"` // default: false
ForwardX11 *bool `yaml:"forwardX11,omitempty" json:"forwardX11,omitempty"` // default: false
ForwardX11Trusted *bool `yaml:"forwardX11Trusted,omitempty" json:"forwardX11Trusted,omitempty"` // default: false
Expand Down
Loading