First: finishing up config with SSH may not work as well as you want. If the VM ever crashes or is rescheduled, it will come up from the Dockerfile. We’re happy to help configure from the Dockerfile though if you’re stuck, we have more experience than we’d like doing that.
Second: SSH is more complicated than we’d like. You will need to:
Connect to your private network with wireguard:
flyctl wireguard create
Setup wireguard to use the generated config
Get an SSH certificate
flyctl ssh establish (this configures the root organization cert, you only need to run it once)
flyctl ssh issue --agent
Get private IP of VM: flyctl ips private
SSH to it: ssh root@<private-ip>
This assumes you’re running an ssh agent, if you’re not, you can run flyctl ssh issue without that arg and follow some extra steps.
We are shipping a one command way to connect to running VMs real-soon-now.
Yes, that’s a good command for finding IPs (you don’t have to use global, though, $FLY_APP_NAME.internal is enough.
It is possible to get an IP that’s not yet in DNS. There will be a small delay between when your VM is running and the DNS server knows about it.
And, when you’re doing deploys, you’ll actually get the new instance before the old one is torn down. So it’s possible the other IPs you got were actually old VMs that hadn’t shut down yet.