From 0431e131bd76a1f9c865b62362ddead479b3d737 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Mon, 10 May 2021 19:49:06 +0000 Subject: [PATCH 1/4] fix: Change SSH port for p2p --- internal/cmd/configssh.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/cmd/configssh.go b/internal/cmd/configssh.go index 120e9a86..c0d99fe6 100644 --- a/internal/cmd/configssh.go +++ b/internal/cmd/configssh.go @@ -205,10 +205,11 @@ func makeSSHConfig(host, userName, envName, privateKeyFilepath string, p2p bool) if p2p { return fmt.Sprintf( `Host coder.%s - HostName localhost - ProxyCommand coder tunnel %s 22 stdio + HostName %s + ProxyCommand coder tunnel %s 12213 stdio StrictHostKeyChecking no ConnectTimeout=0 + IdentitiesOnly yes IdentityFile="%s" ServerAliveInterval 60 ServerAliveCountMax 3 From 45efe4423ad9ab8de455399f110a021f15182d7b Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Mon, 10 May 2021 19:51:10 +0000 Subject: [PATCH 2/4] Fix formatting --- internal/cmd/configssh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/configssh.go b/internal/cmd/configssh.go index c0d99fe6..193b743f 100644 --- a/internal/cmd/configssh.go +++ b/internal/cmd/configssh.go @@ -213,7 +213,7 @@ func makeSSHConfig(host, userName, envName, privateKeyFilepath string, p2p bool) IdentityFile="%s" ServerAliveInterval 60 ServerAliveCountMax 3 -`, envName, envName, privateKeyFilepath) +`, envName, envName, envName, privateKeyFilepath) } return fmt.Sprintf( From 7778fbcebba7bd8615d88269a7bd28d915c726a4 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Mon, 10 May 2021 19:57:43 +0000 Subject: [PATCH 3/4] Change to debug log --- internal/cmd/tunnel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cmd/tunnel.go b/internal/cmd/tunnel.go index 254e6df9..6194891a 100644 --- a/internal/cmd/tunnel.go +++ b/internal/cmd/tunnel.go @@ -126,7 +126,7 @@ func (c *tunnneler) start(ctx context.Context) error { return xerrors.Errorf("dial ice: %w", err) } - c.log.Info(ctx, "Connecting to workspace...") + c.log.Debug(ctx, "Connecting to workspace...") wd, err := wsnet.DialWebsocket(ctx, wsnet.ConnectEndpoint(c.brokerAddr, c.workspaceID, c.token), []webrtc.ICEServer{server}) if err != nil { return xerrors.Errorf("creating workspace dialer: %w", err) @@ -135,7 +135,7 @@ func (c *tunnneler) start(ctx context.Context) error { if err != nil { return err } - c.log.Info(ctx, "Connected to workspace!") + c.log.Debug(ctx, "Connected to workspace!") // proxy via stdio if c.stdio { From ea01d59ee867936d5ede1cc56ca581234829502a Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Mon, 10 May 2021 20:30:32 +0000 Subject: [PATCH 4/4] Update hostname --- internal/cmd/configssh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/configssh.go b/internal/cmd/configssh.go index 193b743f..0853a32e 100644 --- a/internal/cmd/configssh.go +++ b/internal/cmd/configssh.go @@ -205,7 +205,7 @@ func makeSSHConfig(host, userName, envName, privateKeyFilepath string, p2p bool) if p2p { return fmt.Sprintf( `Host coder.%s - HostName %s + HostName coder.%s ProxyCommand coder tunnel %s 12213 stdio StrictHostKeyChecking no ConnectTimeout=0