Skip to content

Instantly share code, notes, and snippets.

@prateekrajgautam
Last active January 27, 2024 07:50
Show Gist options
  • Save prateekrajgautam/29ae64a89a30352817633b214993acd6 to your computer and use it in GitHub Desktop.
Save prateekrajgautam/29ae64a89a30352817633b214993acd6 to your computer and use it in GitHub Desktop.
cloudflared zerotrust tunnel and ssh

cloudflared zero trust tunnel and ssh

SSH conncetion over cloudflared tunnel

create tunnel on cloudflare dashboard zero trust >> access >> tunnels

|subdomain|ssh| |domain|example.com| |type|tcp| |URL|127.0.0.1:22}

Edit ssh config otherwise it will not connect

vim ~/.ssh/config add following lines

Host ssh.example.com
ProxyCommand /usr/local/bin/cloudflared access ssh --hostname %h

now test ssh @ssh.example.com

Reference

Locally managed tunnel

config.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment