flyctl ssh console: Waiting for host... and nothing happens

@nickolay.loshkarev you can ssh directly into the machine if the command still isn’t working out:

Using the steps in Private Networking

  • Run fly wireguard create to create a peer. You can save it as concordia.conf.
  • Use your Wireguard VPN client of choice to connect to the VPN withe config saved above.
  • Now run dig concordia-production-web.internal AAAA to get the IPs of the running instances. You should see something like:
> dig slotbooks-api.internal AAAA
; <<>> DiG 9.10.6 <<>> slotbooks-api.internal AAAA
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33563
;; flags: qr rd ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;slotbooks-api.internal.		IN	AAAA
;; ANSWER SECTION:
slotbooks-api.internal.	5	IN	AAAA	fdaa:0:38f8:a7b:232f:fc2a:25a1:2
;; Query time: 191 msec
;; SERVER: fdaa:0:38f8::3#53(fdaa:0:38f8::3)
;; WHEN: Fri Nov 12 22:46:40 IST 2021
;; MSG SIZE rcvd: 79

The fdaa:0:38f8:a7b:232f:fc2a:25a1:2 is one of the IPs of your app.

  • Run fly ssh issue to get an ssh certificate and save it, I’m saving it as sb.
  • Run ssh -i sb root@fdaa:0:38f8:a7b:232f:fc2a:25a1:2 to connect to your app instances directly.

This should get you ssh’ing directly into your applications inside a Fly VPN.