You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
brev refresh writes <instance>-host with the instance IP but the gateway port (v0.6.337), so host SSH times out #531
Since v0.6.331+ (observed on v0.6.337), brev refresh writes the <instance>-host SSH alias with the instance's own public IP as Hostname but the gateway's port as Port. The pair is unreachable, so ssh <instance>-host (and brev exec --host) time out on a healthy VM-mode instance, while ssh <instance> reaches the same VM through the gateway.
Possibly the root cause of #436 ("reaches the published host SSH endpoint but times out").
Observed (v0.6.337, macOS, VM-mode instances)
Instance
<instance> alias
<instance>-host alias
AWS g4dn.xlarge
global.prd.ga.run.brev.nvidia.com:23126 → reachable, lands on the VM (hostname brev-…, nvidia-smi, docker)
<public IP>:23126 → connect timed out; <public IP>:22 also timed out
Inside the AWS VM, sshd listens on 0.0.0.0:22 and checkip returns the same public IP, so the alias names the right host with the wrong port (the gateway's).
Cause
pkg/ssh/sshconfigurer.gomakeSSHConfigEntryV2:
v0.6.324: the -host entry uses HostName: hostname (the workspace DNS, i.e. the gateway) with Port: workspace.GetHostSSHPort().
v0.6.337 (and main): it uses HostName: workspace.GetHostSSHHostname() (the instance IP) with the same GetHostSSHPort().
For these instances HostSSHPort == SSHPort is the gateway's port, so the new hostname and the old port no longer belong together.
Expected
<instance>-host reaches the host: either the gateway with HostSSHPort (as in v0.6.324), or the instance address with a port its security group opens.
Activity