Skip to content

Commit bc774de

Browse files
authored
Merge pull request #2706 from AkihiroSuda/fix-1617
Disable `ssh.loadDotSSHPubKeys` by default
2 parents 7ab02dc + 9e7fc04 commit bc774de

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
@@ -155,7 +155,7 @@ type SSH struct {
155155
LocalPort *int `yaml:"localPort,omitempty" json:"localPort,omitempty"`
156156

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

0 commit comments

Comments
 (0)