SSH access to preview-environments does not work any more
Bug description
I have rebase my branch the latest commit from main and I am no longer able to login to newly created VMs with SSH over port 22.
Steps to reproduce
You need to open a new workspace with the branch from this PR. After the VM is up and running you should be able to connect to the VM using the script ./dev/preview/ssh-vm.sh. It will create a SSH connection using a port-forwarding to port 22 over port 8022 on the workspace. Everything will be set up but the connection stops at the login.
Removing the Gitpod installation from the werft job .werft/build.ts will work as expected.
Workspace affected
No response
Expected behavior
No response
Example repository
No response
Anything else?
No response
@iQQBot Do you know why that might happen?
https://gitpodio-gitpod-dqhr5o84510.ws.wth-automate-vm-ssh-access.preview.gitpod-dev.com/
stuck in Pulling container image …
can you share how to connect into this vm's kubernetes ?
@wulfthimm Hi, this is because we add SSH tcp tunnel in proxy https://github.com/gitpod-io/gitpod/pull/7607
There is some way to resolve this issue
- If the preview environment don't want to support ssh gateway (because is lack public ip) you can simple rebase to main again, and don't configuration hostkey because I already fixes it by https://github.com/gitpod-io/gitpod/pull/7731
- If the preview environment want to support ssh gateway (using tailscale / self-hosted-vpn / gcp loadbalancer to harvester) you may need change vm ssh port to another port
If you need more information please ping me
can you share how to connect into this vm's kubernetes ?
You can ssh into the machine using the script ./dev/preview/ssh-vm-sh.
- If the preview environment don't want to support ssh gateway (because is lack public ip) you can simple rebase to main again, and don't configuration hostkey because I already fixes it by Not exposing port 22 if not configured ssh gateway hostkey #7731
I will rebase again. Many thanks, @iQQBot !
This is still happening unfortunately :/
I've noticed that SSH works if the VM has just been spun up, following SSH attempts always fail for some reason
can you give me some information, such as your namespace name
Yeah sure thing 🙂

This translates to preview-as-vm-monitoring namespace inside the harvester cluster
and don't configuration hostkey
I looked your configuare ssh host key, so that proxy is add 22 port to loadbalancer
Sorry, I'm not sure if I understood 😬
Are we both talking about preview environments on Harvester cluster? I believe we use port-foward inside the workspace instead of load balancers, right?
Yes we talk same problem, the loadbalencar I mean is k3s loadbalancer
You can use kubectl get svc proxy -o yaml to see it
You can change the vm-ssh port to 2200 like https://github.com/gitpod-io/gitpod/commit/6926c575f4485b4275cb151eeba0320c23347905 do
I believe this was fixed some days ago :)