Connect through Cloudflare
A box behind Cloudflare needs one route, to its SSH server, because everything devlanes mirrors travels inside the SSH connection.
::example{slug="remote-ssh-box"}
Route SSH through a tunnel on the box
Section titled “Route SSH through a tunnel on the box”Install cloudflared on the box, create a tunnel, and give it a published application route on a hostname of your zone with the SSH service type and localhost:22. Protect the hostname with a self-hosted Access application, and run the tunnel as a service.
tunnel: <tunnel-uuid>credentials-file: /etc/cloudflared/<tunnel-uuid>.jsoningress: - hostname: ssh.example.invalid service: ssh://localhost:22 - service: http_status:404Add the box to your SSH config
Section titled “Add the box to your SSH config”Reach the hostname through cloudflared, written with its full path, since your daemon’s path may not include it.
Host my-vps HostName ssh.example.invalid User you ProxyCommand /usr/local/bin/cloudflared access ssh --hostname %hSign in, then connect
Section titled “Sign in, then connect”cloudflared signs you in through the browser, which your daemon cannot show you, so sign in from a terminal first. Then pair and connect as Connect to a box describes. When the Access session expires, a reconnect fails until you run both commands again.
$ ssh my-vps true$ devlanes remote connect my-vpsIf your machine runs Windows
Section titled “If your machine runs Windows”Write the full path to cloudflared.exe in the proxy command, in double quotes when it holds a space.
If you use the Cloudflare One Client
Section titled “If you use the Cloudflare One Client”The box is then reachable at a private address through the client, and the SSH entry needs no proxy command.