Skip to content

Commit 7672730

Browse files
authored
refactor(ssh-agent): using chain calls set server information (#78)
1 parent 1d086fc commit 7672730

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require (
1818
github.com/gorilla/mux v1.8.1
1919
github.com/json-iterator/go v1.1.12
2020
github.com/oomol-lab/ovm-ssh-agent v1.1.1-0.20250307113355-2fe4d500c53c
21-
github.com/oomol-lab/ssh-forward v0.0.0-20250311033012-057eea751dd7
21+
github.com/oomol-lab/ssh-forward v0.0.0-20250311095617-1689c70ff096
2222
github.com/prashantgupta24/mac-sleep-notifier v1.0.1
2323
github.com/shirou/gopsutil/v3 v3.24.5
2424
github.com/sirupsen/logrus v1.9.3

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ github.com/oomol-lab/ssh-forward v0.0.0-20250310111812-cc1e7c2d1876 h1:9HgxxAcKJ
7474
github.com/oomol-lab/ssh-forward v0.0.0-20250310111812-cc1e7c2d1876/go.mod h1:/X60uEwaCA1Bt0AJ+6VShkjErRBbkDbzmqwxR8jPpMI=
7575
github.com/oomol-lab/ssh-forward v0.0.0-20250311033012-057eea751dd7 h1:T+1ULZnf+KeO/w3kTuv5zQwllJjISB0UTKvNR4CHtwc=
7676
github.com/oomol-lab/ssh-forward v0.0.0-20250311033012-057eea751dd7/go.mod h1:/X60uEwaCA1Bt0AJ+6VShkjErRBbkDbzmqwxR8jPpMI=
77+
github.com/oomol-lab/ssh-forward v0.0.0-20250311095617-1689c70ff096 h1:Z3cfFAsFY4Moq2Vy7UIqBYZAbEKHaLKHiWidD1WfNKA=
78+
github.com/oomol-lab/ssh-forward v0.0.0-20250311095617-1689c70ff096/go.mod h1:/X60uEwaCA1Bt0AJ+6VShkjErRBbkDbzmqwxR8jPpMI=
7779
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
7880
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7981
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=

pkg/machine/shim/ssh_auth.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ func startSSHAuthServiceAndForward(ctx context.Context, mc *vmconfig.MachineConf
8181
logrus.Infof("connect state: %v", state)
8282
})
8383

84-
socketForwarder.SetKeyFile(mc.SSH.IdentityPath)
85-
socketForwarder.SetUser(mc.SSH.RemoteUsername)
86-
socketForwarder.SetPort(mc.SSH.Port)
84+
socketForwarder.
85+
SetKeyFile(mc.SSH.IdentityPath).
86+
SetUser(mc.SSH.RemoteUsername).
87+
SetPort(mc.SSH.Port)
8788

8889
// We set a callback to know when the tunnel is ready
8990
socketForwarder.SetConnState(func(tun *forwarder.ForwardConfig, state forwarder.ConnState) {

0 commit comments

Comments
 (0)