Can cloudflare replace/mimic ngrok functionality?

I’m using ngrok, which is perhaps the golden standard in tunneling.
In particular, I’m using it to tunnel to my ssh server at home.
From my remote machine terminal, I can access my home ssh server.

With Cloudflare, so far, all I could do is get ssh access via the browser, which is cumbersome and clunky.

Is it possible to get ssh access from terminal with Cloudflare? even if that involved extra port setups for https compatibliity.

Thank you.

Hi Ahmed,
yes, it’s possible to achieve same approach with cloudflared. Additionally, if you have a preference for remote ssh over terminal you can make it!

  1. you have to setup cloudflared on your remote machine via this link
  2. once reached to step 4. which consists of creating configuration file please check the configuration sample below that illustrate your use case:
tunnel: <tunnel-uuid>
credentials-file: ~/.cloudflared/<tunnel-uuid>.json
  - hostname:
    service: ssh://localhost:22
  1. getting back to your local machine you have to install cloudflared via this link
  2. after installation, you can setup your .ssh/config to the following
Host remote_machine	
	User user
        # optional - in case you opt for authentication using ssh key. it is recommended over password authentication
	IdentityFile ~/.ssh/id_rsa
	ProxyCommand /path/to/bin/cloudflared access ssh --hostname %h 

In case you need any further assistance please feel free to post a reply and I will be happy to a help.
At your disposal


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.