nx1x/Cloudflare Tunnel SSH Setup

Set up SSH via Cloudflare Tunnel with cloudflared - zero-trust access without exposing port 22

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit May 9, 2026
License
Apache 2.0

Pinned Snippet

workflow.ymlSHA-pinned
uses: nx1x/cloudflare-tunnel-ssh-action@5b09bfc4ba3dc20b3d77d96271fff5a20fe64107 # v1.0.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
cf-access-client-idCloudflare Access service token ID (used as TUNNEL_SERVICE_TOKEN_ID)yes
cf-access-client-secretCloudflare Access service token secret (used as TUNNEL_SERVICE_TOKEN_SECRET)yes
ssh-private-keySSH private key (Ed25519 or RSA) for authenticating to the remote serveryes
ssh-hostSSH hostname routed through Cloudflare Tunnel (e.g. ssh.example.com)yes
ssh-userSSH username on the remote servernodeploy
cloudflared-versioncloudflared version to install. Use "latest" or a specific tag like "2025.4.0".nolatest
ssh-key-pathFilesystem path where the SSH private key will be writtenno~/.ssh/id_ed25519
connect-timeoutSSH ConnectTimeout in seconds (cloudflared handshake can take several seconds)no120
server-alive-intervalSSH ServerAliveInterval in seconds (keep-alive ping frequency)no30
test-connectionRun a test SSH command after setup to verify the tunnel is workingnotrue

no outputs