Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit f2c17d6

Browse files
authored
fix: Change SSH port for p2p (#339)
* fix: Change SSH port for p2p * Fix formatting
1 parent bb4ced4 commit f2c17d6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

internal/cmd/configssh.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,15 @@ func makeSSHConfig(host, userName, envName, privateKeyFilepath string, p2p bool)
205205
if p2p {
206206
return fmt.Sprintf(
207207
`Host coder.%s
208-
HostName localhost
209-
ProxyCommand coder tunnel %s 22 stdio
208+
HostName coder.%s
209+
ProxyCommand coder tunnel %s 12213 stdio
210210
StrictHostKeyChecking no
211211
ConnectTimeout=0
212+
IdentitiesOnly yes
212213
IdentityFile="%s"
213214
ServerAliveInterval 60
214215
ServerAliveCountMax 3
215-
`, envName, envName, privateKeyFilepath)
216+
`, envName, envName, envName, privateKeyFilepath)
216217
}
217218

218219
return fmt.Sprintf(

internal/cmd/tunnel.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func (c *tunnneler) start(ctx context.Context) error {
126126
return xerrors.Errorf("dial ice: %w", err)
127127
}
128128

129-
c.log.Info(ctx, "Connecting to workspace...")
129+
c.log.Debug(ctx, "Connecting to workspace...")
130130
wd, err := wsnet.DialWebsocket(ctx, wsnet.ConnectEndpoint(c.brokerAddr, c.workspaceID, c.token), []webrtc.ICEServer{server})
131131
if err != nil {
132132
return xerrors.Errorf("creating workspace dialer: %w", err)
@@ -135,7 +135,7 @@ func (c *tunnneler) start(ctx context.Context) error {
135135
if err != nil {
136136
return err
137137
}
138-
c.log.Info(ctx, "Connected to workspace!")
138+
c.log.Debug(ctx, "Connected to workspace!")
139139

140140
// proxy via stdio
141141
if c.stdio {

0 commit comments

Comments
 (0)