Skip to content

Commit 9e7fc04

Browse files
committed
Disable ssh.loadDotSSHPubKeys by default
This might be a breaking change for new instances, but does not affect existing instances. Fix issue 1617 Signed-off-by: Akihiro Suda <[email protected]>
1 parent 2ea780e commit 9e7fc04

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

examples/default.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ ssh:
148148
# This option is useful when you want to use other SSH-based
149149
# applications such as rsync with the Lima instance.
150150
# If you have an insecure key under ~/.ssh, do not use this option.
151-
# 🟢 Builtin default: true
151+
# 🟢 Builtin default: false (since Lima v1.0)
152152
loadDotSSHPubKeys: null
153153
# Forward ssh agent into the instance.
154154
# The ssh agent socket can be mounted in a container at the path `/run/host-services/ssh-auth.sock`.

pkg/limayaml/defaults.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ func FillDefault(y, d, o *LimaYAML, filePath string) {
350350
y.SSH.LoadDotSSHPubKeys = o.SSH.LoadDotSSHPubKeys
351351
}
352352
if y.SSH.LoadDotSSHPubKeys == nil {
353-
y.SSH.LoadDotSSHPubKeys = ptr.Of(true)
353+
y.SSH.LoadDotSSHPubKeys = ptr.Of(false) // was true before Lima v1.0
354354
}
355355

356356
if y.SSH.ForwardAgent == nil {

pkg/limayaml/defaults_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func TestFillDefault(t *testing.T) {
8080
},
8181
SSH: SSH{
8282
LocalPort: ptr.Of(0),
83-
LoadDotSSHPubKeys: ptr.Of(true),
83+
LoadDotSSHPubKeys: ptr.Of(false),
8484
ForwardAgent: ptr.Of(false),
8585
ForwardX11: ptr.Of(false),
8686
ForwardX11Trusted: ptr.Of(false),

pkg/limayaml/limayaml.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ type SSH struct {
154154
LocalPort *int `yaml:"localPort,omitempty" json:"localPort,omitempty"`
155155

156156
// LoadDotSSHPubKeys loads ~/.ssh/*.pub in addition to $LIMA_HOME/_config/user.pub .
157-
LoadDotSSHPubKeys *bool `yaml:"loadDotSSHPubKeys,omitempty" json:"loadDotSSHPubKeys,omitempty"` // default: true
157+
LoadDotSSHPubKeys *bool `yaml:"loadDotSSHPubKeys,omitempty" json:"loadDotSSHPubKeys,omitempty"` // default: false
158158
ForwardAgent *bool `yaml:"forwardAgent,omitempty" json:"forwardAgent,omitempty"` // default: false
159159
ForwardX11 *bool `yaml:"forwardX11,omitempty" json:"forwardX11,omitempty"` // default: false
160160
ForwardX11Trusted *bool `yaml:"forwardX11Trusted,omitempty" json:"forwardX11Trusted,omitempty"` // default: false

0 commit comments

Comments
 (0)